You can download source code files of php from http://www.php.net/downloads.php
and compile, i am not familiar with Mac OS, so i cant instruct how to
compile it on Mac. there is ready to use binary for windows, if you
have windows, you can install PHP easly. just download the installer
and run it.