is there a php library or something?
A:
You can execute JavaScript on the server side using Java 6 and Rhino.
duffymo
2010-05-10 00:13:40
+2
A:
There's quite a few ways of executing JavaScript on the server-side. A recently popular environment is node.js. There's also options such as Rhino (which has Nitro and Helma). Wikipedia also has a massive list of server-side JavaScript environments.
You also asked if there was a PHP extension available. There's one called php-js, based upon Mozilla's SpiderMonkey.
Brian McKenna
2010-05-10 00:30:32
here's tutorial for rhino: http://sites.google.com/site/javascript4rhino/
2010-05-10 00:49:52
also, this might help too: http://www.terminally-incoherent.com/blog/2008/01/08/rhino-scripting-java-with-javascript/
2010-05-10 00:59:53