To enable PHP on an OSX machine (Leopard or Snow Leopard) here is a useful link:
Working with PHP 5 in Mac OS X 10.5
For sierra I found this tutorial to be accurate: Get Apache, MySQL, PHP and phpMyAdmin working on macOS Sierra
Step 1: How to Setup OS X to Work with PHP
To enable PHP on an OSX machine (Leopard or Snow Leopard) here is a useful link:
Working with PHP 5 in Mac OS X 10.5
For sierra I found this tutorial to be accurate: Get Apache, MySQL, PHP and phpMyAdmin working on macOS Sierra