The code can be directly run in your browser, meaning you can execute php code straight out of your browser! It can also be run on node.js, but strongly recommend not to due to potential security issues.
As it might not be as self explanatory, this project is purely a proof-of-concept and should by no means be considered to be used in any sort of production environment.
var engine = new PHP ('<?php echo "Hello world!"; ?>'); console.log( engine.vm.OUTPUT_BUFFER); // the outputted buffer from the script
The code is by default run synchronously so the output will be immidiately readable upon the engine finishing execution. Alternatively, the VM can be set to run under a web worker as well, in which case a callback function will need to be provided.
The current status of the passing tests can be seen here. I'll be the first admit that there are still a lot of bugs, but considering the complexity of the language, it is well on its way.