With OS X 10.9 Mavericks, Apple chose to ship PHP 5.4.17. This is how to set it up from a clean install of Mavericks.
Note: If you don’t want to use the built-in PHP or want to use version 5.5, then these are some alternatives:
- PHP 5.3/5.4/5.5 for OS X 10.6/10.7/10.8/10.9 as binary package by Liip
- Zend Server (Free Edition)
- Homebrew has PHP.