Install Brew by using
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
As PHP is included with OS X, Brew wont add it.
However new in bre 0.9 is the tap command that allows you to add repositories to brew
To Add php look hereĀ https://github.com/josegonzalez/homebrew-php