Sure. Basically, when you build PHP you do the three step gnu boogie of:
#> ./configure
#> make
#> make install
If all goes well, no errors, you get php.
This one wont make pdfs or use fancy fonts, but it is the basic version of the language.
If it doesn't put the php bin in your path, you'll need to copy it there yourself or change your path to point there.