For brew users, you may not need php55 if you already have 54 - but no matter what, you should probably run these commands
$ brew install php54 php54-xdebug php54-mcrypt
you can replace 54 with the last number if you want. last i checked that he was at 56
then, based on some comments above, you should run:
$ php --version
it will probably display:
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
if so, then change your .bash_profile as some of the other commentators my brew instance (I think its default value) lives in
/usr/local/Cellar /usr/local/bin
as soon as everything is installed using brew, they will be placed in the basement and connected through the basket. but in this case we need to override php
$ sudo nano ~/.bash_profile
my kinda looks like this:
PATH=$PATH:~/bin PATH=$PATH:/usr/local/bin PATH=$PATH:/usr/local/sbin PATH=$PATH:/usr/local/Cellar/r/2.15.1/R.framework/Versions/Current/Resources/li$ export PATH
which means that it already has access to / usr / local / bin - but I use an alias to indicate adding this line at the bottom:
alias php="/usr/local/bin/php"
save and close the terminal window, open another one, and it should show something like:
$ php