I am not finding a php5 package for galileo here: http://iotdk.intel.com/ipk/i586/
Any chance one is available?
Not answering your question but curious: are you looking for a standalone PHP5, or rather one included in lighttpd, or even apache?
If you do a search at layers.openembedded.org for a PHP recipe, there are a few options. see below.
You would then need to build this into the existing Yocto system. That's left as an exercise for the user (8-).
A server-side, HTML-embedded scripting language. This package provides the apache php module.
A server-side, HTML-embedded scripting language. This package provides the CGI.
Web-based MySQL administration interface
Debugging and profiling extension for PHP