This isn't strictly an XAMPP question, but a general Linux/Apache/PHP one.
Is it possible to have both PHP4 and PHP5 available at the same time, as Apache modules, and to use Apache directives in httpd.conf or .htaccess to specify that scripts in some directories run PHP4, and scripts in other directories run PHP5?
I know a little about writing custom Apache modules, if that's needed.