Two months ago I was looking for a way to let apache serve python scripts as plain text. Today I had the same problem with php files. Here is my solution.

What you need is a .htaccess file in the same directory as the files you want to serve, with the following directive in it:

AddType text/plain .php

Be carefull: within the directory, anybody will be able to look the source code of all files with .php extension.