How Do I Install PHP CLI on Mac OS X?
I'm running Mac OSX 10.8.2. I'm also quite new to Mac OSX -- previously the only Mac I understood was the Classic Mac. My other workstations are Windows and Linux.
What's the technique to install PHP CLI on Mac OSX? See, I use gedit for Mac and connect to either an FTP location or to my local Ubuntu Linux Server in a VM. In that editor, there's a feature where I can add an external program, and a technique I usually use is to add "php -l", which lets me take the current document and lint check it against PHP CLI. I used to do this all the time on Ubuntu, but on the Mac I'm not certain how to install PHP CLI.
It should already be present. Typing php --version
from a command line on a Mac OS X 10.8 install, i get:
merak:~ peelman$ php --version
PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
If you need other utilities, you should look at the Homebrew project.