There is a way to achieve this on a per-directory basis. You do find contradicting opinions on the web, but I have been able to make it work.
First, you must organize to have your different versions of PHP ready to run as CGI or fastCGI extentions. I use fastCGI in the example below
You will need to set up two separate php.ini files (and yes, maintaining them in sync where it matters can be a pain, but the alternative is to have only one php.ini file for 2 different versions of PHP & that's either impossible or full of loopholes)
Place those php.ini files in the directory of your PHP code, modules, etc. one for each version. This is where PHP will go look for them first, absent the PHPRC environment variable. You should not set the PHPRC variable, unless you discover how to make it different for 2 different fastCGI stubs, I have not been able to: the Apache FcgidInitialEnv directive works only globally, not on a per-directory basis, and the FcgidCmdOptions which is supposed to does not work at all.
Then, all you have to do is to add the following code in you httpd.conf file:
#
# start PHP as FastCGId
#
LoadModule fcgid_module modules/mod_fcgid.so
#
# PHP 7.0 is the default
# PHP 5.2 is the legacy
#
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "c:/WebServers/PHP-7.0.5/php-cgi.exe" .php
</Files>
#
# Keep PHP 5.2 for legacy Drupal sites
#
<DirectoryMatch "Puitscarre|Royale$">
<Files ~ "\.php$>"
AddHandler fcgid-script .php
FcgidWrapper "c:/WebServers/PHP-5.2.39/php-cgi.exe" .php
</Files>
</DirectoryMatch>
It works perfectly on my environment: Windows 7, Apache 2.2. And, by the way, the code that is in the Directory environment above also works if you put it in the .htaccess file of the directories which need a specific or legacy version of PHP
Enjoy !