Interface for using spidermonkey in PHP
Make sure you have a recent version of spidermonkey installed (JSAPI 17 or more). Then checkout that project, and inside the folder run:
phpize ./configure make
You should find the spidermonkey.so file in the modules folder.