Module to show code and its output
I think that in your case, you can insert easyly your own PHP snippets in a common content type to be executed and displayed.

For run your own code from a node you can enable the PHP filter module (it is already in Drupal core, so you does not need download, just enable). this module allows embedded PHP code/snippets to be evaluated. And then, for syntax highlighting of your code, there are several alternatives of modules like:

http://drupal.org/project/geshifilter GeSHi Filter module, for D6 and D7. In this page you will find links to modules alternatives. I have tested this module in drupal 6. Follow the readme.txt instructions. According my test you can show your code (inside respective tags to show code) and run PHP code (copy/paste your code after your code to show, outside the tags to show code). this is an example:

&lt;code type="php"&gt;
&lt;?php
echo "hello world";
?&gt;
&lt;/code&gt;

&lt;?php
echo "hello world";
?&gt;


and this is the output:



http://drupal.org/project/wysiwyg_syntaxhl (for tinyMCE rich text editor) for D6. This alternative seems not listed in Geshi Filter page.

I hope this information be useful.