I like using OS X's built-in packages where possible, but unfortunately Apple is way behind with their PHP package, having it locked on 5.3.15. In the past I've seen people use tools like Mamp, or Xampp to provide this for them, but frankly I'm not a big fan of these tools.
Homebrew provides a solution. Homebrew is OS X missing package manager, and it's an absolute great tool to work with. Getting started with it is a bit harder, as there's a few bigger dependencies you need, such as an up-to-date XCode installation. Once you've installed homebrew, it's a matter of running the following commands:
After that, open /etc/apache2/httpd.conf, and look for this line:
Comment that out (with #) and add the following line:
After that, restart apache and things should just work. For more detailed instructions, take a look at the documentation for homebrew-php
Edit: On one Mac I had to first run "brew unlink libiconv" for PHP compilation to complete.