I recently formatted my MacBook and I chose to use PHP that comes with the operating system. This version comes with a few libraries installed, then you need to make some customizations.
First you must enable the PHP module in Apache, there are several tutorials talking about it on the web. A quick Google search brings some good results over this. So I will not talk about it here.
Once installed the PHP module in Apache and properly configured, you must compile some libraries from source.
First of all, you should make sure that you have Developer Tools installed. These software usually comes at an additional installation disc, along with your computer.