Gentoo Allows Switching PHP Version

Maybe they had it before, but I just noticed this today, that we can install more than one versions of PHP, and then use eselect to switch the version.

In short, we can set in /etc/make.conf:

PHP_TARGETS="php5-3 php-5-2"
PHP_INI_VERSION=production

Then call eselect to see what php versions we have available in apache:

# eselect php list apache2 

Without "PHP_INI_VERSION=production", a dev version of php.ini will be installed.

See this webpage Gentoo Linux Documentation -- Upgrading PHP.