This Phpbrew set up is a variation of what is described here.
In order to use with Silverstripe:
Please check first:
Apache module dir /usr/libexec/apache2 is writable. If not, run “sudo chmod -R oga+rw /usr/libexec/apache2”.
In case you are not allowed to do this operation above, disable the System Integrity Protection(SIP) as described here.
After this, do the phpbrew or brew:
phpbrew install 5.6 +json +ctype +dom +fileinfo +hash +iconv +mbstring +mysql +session +tokenizer +xml +apxs2=/usr/sbin/apxs +gd -- --with-jpeg-dir=/usr/local/Cellar/
As a alternative, you could install php 5.6 using:
brew install php56 cp /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
If you wish to use Nginx, go to here.