You can't get syntax highlighting in Evernote directly, but what you can do is use an online syntax highlighting service and copy the highlighted content straight from the page.
First, I went to http://tohtml.com/auto/ and pasted in some code:
<?php
for ($i=0; $i<4; $i++) {
echo 'This is a test of syntax highlighting in Evernote using Pastebin';
}
?>Then, I copied the resulting code from the output, which you see here, and paste it into an Evernote note.

You could also use the Evernote Firefox plugin to create a note straight-up, but it's a pain trying to undo the CSS styling to get some plain text in before your code, so I would create a new note, add a couple of blank lines to the beginning, and paste in the code after that.
The result is what you see below. This works because Evernote stores HTML as HTML, and if there's embedded style tags, those will get copied over too. I first tried this experiment with Pastebin, but it didn't work because the styling is not inline.
<?php for ($i=0; $i<4; $i++) { echo 'This is a test of syntax highlighting in Evernote using Pastebin'; } ?>

Comments
Good call, I was looking at Code Collector, Snippet, and a couple of other apps, but I used Evernote all the time, just didn't like the non-highlighted code. Awesome!
Thanks Chris!
Hey Pat, a belated "your welcome", enjoy!
Thanks for this, I was searching for something similar. As an alternative, I found the following: Highlight (http://www.andre-simon.de/). It supports more languages (160), some of which I use and tohtml does not support, has more css themes (80) and it is a native app (all OSs I think). I noticed that it also has an api and a cli, so maybe someday I will get some time and either do a plug-in into Evernote or into Highlight that would connect the two. Just an FYI, if you use it, don't use the copy preview to clipboard, but hightlight the preview and copy it or it won't work into Evernote.
I'm working on a code snippet tool that integrates with Evernote called Sniptastic! (http://www.sniptastic.com/). It's still in
the early stages, but development is going very quickly. It has syntax
highlighting and a plugin for Visual Studio.
How did you manage to get proper indentation and line breaks?
I can get the colors just fine, but all other formatting is lost.