syntax highlighting and

Indeed, you need to convert the code to their HTML entities to prevent WordPress (or the TinyMCE editor) from stripping it out. The Visual editor does some of this work for you, in the HTML editor you must do this yourself.

Fortunately, there are syntax highlighter plugins (also based on the same SyntaxHighlighter Javascript library) that do this for you, like SyntaxHighlighter Evolved. With this plugin you can write [php]Your <?php echo 'code'; ?>[/php] and it will escape and highlight it. (There are other shortcodes too of course, [php] is just a shorthand.)