Yes, there are a couple of ways to tackle this with Apache.
One way is to put the following in your httpd.conf file. If you are running a virtual server, this can go inside the virtual server portion of your configuration.
<Location /foo>
AddType application/x-httpd-php-source .php .php4 .php3 .phtml
</Location>
Now for anything under the /foo URI that carries any of the common PHP suffixes, you're going to get nifty colorized code instead of running the PHP scripts.
You also could use the <LocationMatch> directive, which uses a regular expression.
And you could just AddType text/plain for those file types if you prefer.