Module to show code and its output What I want to do is setup a "PHP filter" to run the code I'm told to run, and display the results as a normal page.

I also want to be able to have a way to show the code; many websites do it, and I was wondering how I could do so within drupal.
Maybe I could tabs in a content type (one for processed code, other for actual code), or an overlay with the PHP Text, or something to show the text in the "PHP Text Field" easily.

Further Description:
Say I have the following code as the body content of my page.

&lt;?php echo "Hello World!" ?&gt; 


Who watch the page would see the code output ("Hello World!"); they would not see the PHP code that generated that output. I want something to display the code.

The output of the Geshi Filter module is the following:
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.