Apache2 : 2 php versions in the same VHOST

So, you're trying to funnel a particular virtualhost, through a pipe, that goes to a proxy module to access the host on loopback??? But only for PHP files? That sounds unnecessarily complicated.

Why not run a second virtual host, on a secondary port, and use mod_proxy to handle the entire virtual host. (ie. generally "the way" to do an upgrade, and still have it Internet-facing).

Or, you know, you can literally do a virtualhost for each, as you migrate. And then drop-in simple redirects between virtualhosts, when the "alternate" URL appears on the "wrong" host.

When you're dealing with this sort of migration, pick the simplest form of "this versus that" and roll that way.

Or, if I completely missed the "ask" in your question... are you having success running multiple versions of PHP under the same instance? Please clarify, as frankly... it's not something I'd ever recommend because, you know... PHP. ;-)