A roundup of links on how to run PHP4 and PHP5 on the same server;
John Coggeshall explains, using two Apache instances, Apache’s mod_proxy and a virtual host.
Urs Gehrig explains. This is probably about the quickest and easiest way to get them running together. Of course PHP as a CGI is not quite the same as an Apache module, performance / $_SERVER variable-wise. Urs also has a handy page of links on PHP5 Installation and related here.
Tobias Schlitt explains how to get both running as apache modules under Linux.