WYSIWYG Editor with highlighting for PHP code input
For output highlighting, you want the Syntax highlighter module. That syntax highlighting module integrates with a couple of other WYSIWYG modules, and you can find great setup instructions.

For in-editor syntax highlighting, you will want the Wysiwyg CodeMagic module. It depends on CodeMagic, TinyMCE, and Drupal's WYSIWYG module. That will allow you to do input highlighting, as demonstrated here: