Javascript  4(for)  Php  5 Logo
Home Examples Downloads FAQ Documentation Road Map Forums


J4P5 is a JavaScript interpreter written in PHP 5, that allows to run untrusted scripts in a sandbox on your server. It aims to implement most of Ecma-262 3d edition.
J4P5 uses a modified version of the CFG parser of the MetaPHP project, and is licensed under the GPL
This project is new. The current version already exposes most of the features commonly associated with JavaScript, such as objects, prototypes, closures.
Notable caveats of this version (aka "the TODO list"):
  • No support for unicode strings
  • No support for regular expressions
  • Semi-colons at the end of statements are not optional
  • Most of the pre-defined objects/methods have not been tested
  • The speed is definitely slower than PHP. It's getting better though.
To quickly understand what J4P5 can do, please check out our examples.


Version 1.1 uploaded, with friendlier .zip package and much improved parsing speed.
The sourceforge project is up.
Site design and content copyright (c) 2004,2005 Henri T.