downloads/
|
freshmeat entry
|
discussion
This scripting language interpreter is implemented in PHP and allows to execute user-supplied JavaScript-lookalike code server-side, without compromising security because everything runs safely in a sandbox. This is of course much slower than a real interpreter, but is useful for integration into CMS/Wiki engines to have users extend a sites' dynamic functions. It can be connected to the hosting interpreter (PHP) by allowing access to certain (interface) functions and even PHP variables.
You can run a small test script here to check it out. It is currently very limited (early alpha, in development), as it for example does not provide most JavaScript object functions and multiple important language constructs.
'; echo '';
if ($_REQUEST["dump_bc"]) {
js_compile($_REQUEST["script"]);
}
else {
js_exec($_REQUEST["script"]);
}
echo '' . "\n\n";
echo "";
echo '';
}
?>