Today I had to update a project that was developed using WordPress and PHP 5.3. Today I have PHP 5.4 installed on my machine and this newer version abandoned some old features, and you have some Fatal errors like Call-time pass-by-reference has been removed. The solution was go back to PHP 5.3 and do the updates on my the project, because the production server is with PHP 5.3 too.
The cleaner solution is using Vagrant, that allow you install only what you want for a specific project, leaving your machine cleaner. But was not my case at the moment.
I’ve used macports to install PHP in my machine. I think macports is a very good way to organize all sources in the same place. More information you can find here.
You can install PHP 5.3 and 5.4 in the same machine and decide what you’ll use just updating your Apache httpd.conf file.