That will be an issue of modifying your Apache configuration files to use the different versions of PHP on different ports.
You'll want to configure a vhost (virtual host) for port 81 or 8080, and inside that you'll want to configure PHP4 (or 5).
Getting the two versions of PHP to work on different ports should be as simple as individually configuring the virtual host configuration for each port, using the lines you'd normally add to the Apache config during installation, such as:
PHPIniDir "C:\Program Files\PHP\"
LoadModule php5_module "C:\Program Files\PHP\php5apache2_2.dll"
So, your httpd-vhosts.conf file might look like this:
<VirtualHost *:8080>
DocumentRoot ...
ServerName MyPHP4
<Directory ...>
...
</Directory>
PHP4 Configuration
</VirtualHost>
<VirtualHost *:8081>
DocumentRoot ...
ServerName MyPHP5
<Directory ...>
...
</Directory>
PHP5 Configuration
</VirtualHost>