NOTE: This tutorial is outdated. I tried to rebuild it but many download links have gone down. For installing v8js I suggest using Jan-E’s builds which you can find here:
https://www.apachelounge.com/viewtopic.php?t=6359
You can also find some downloads and information here:
You can test your installation with this snippet:
$v8 = new V8Js(); $v8->executeString("print('hello world');");
Output: hello world
Remember that it does not have any sort of DOM, so running commands on window and document will not work without first creating the DOM. There are some ways to do this by loading a javascript implementation of the DOM, but I haven’t really tried that.