This is not really a patch, it's an add-on for megahal:
I was missing support for php so I created it. I used SWIG to
generate the needed wrapperfiles and libs.
My package includes the needed documentation, one interface file
and a shellscript.
You may include this stuff into megahal if you like.