Why not using a Vagrant environment or something similar? Even though using a virtualized setup might be some overhead in the first place for learning and setup, it will pay off in the long term. Imagine a working virtual environment (e.g. Vagrant with Puppet or Chef), you just had to switch the version and here we go => 20 minutes later your full working stack is ready to be tested with the new or changed PHP version. No need for path switches, changed build steps or an adjusted shebang in some outdated CLI-PHP scripts ;-)