According to the resource I've found after researching on this topic, it is as you already thought a (Fast) CGI wrapper
which allows you to change the PHP version used via e.g. .htaccess .
How to achieve this is explained thoroughly here: http://linuxplayer.org/2011/05/intall-multiple-version-of-php-on-one-server .
In case the site is not reachable, here I'm going to list the steps:
- Install required dev packages
- Compile and install
- Create a fastcgi wrapper script
- Build and install e.g. php-5.3 with fpm enabled
- Configure php-fpm
- Start fpm
- Install and setup mod_fastcgi, mod_fcgid
- Update the Apache config file
- Restart Apache