Friday, July 13th, 2007

J4P5: JavaScript interpreter written in PHP 5

Category: JavaScript, PHP

I haven’t seen many languages implemented in PHP. 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.

Posted by Dion Almaer at 2:23 am

3.8 rating from 52 votes


Comments feed TrackBack URI


Comment by David G. Paul — July 13, 2007

This could prove VERY interesting

Comment by Jamie — July 13, 2007

server side javascript return

Comment by joelhy — July 13, 2007


Comment by Калоян К. Цветков — July 13, 2007

old news… project is probably not maintained anymore. Haven’t seen active development on this for a long time.

Comment by Thorsten — July 13, 2007

So the point of this would let you write server side code with javascript???

Comment by justin — July 13, 2007

PHP sucks a lot!

Comment by JohnDoe — July 13, 2007

Despite the way cool factor, I think there would be much better tools available to get your coffee pot talking to your car garage.

Comment by Andrew — July 13, 2007

The last update was two years ago, it’s pretty much dead, unless someone’s interested in reviving it.

Comment by Scriptor — July 13, 2007

The point of this is so spammers can run some JS on the server side to get around things when there is more JS hoops to go through before comment spamming…. :(

Comment by Steven — July 13, 2007

I have waited for it.. it is a very interested for me!!

Comment by sweetier — July 16, 2007

Comment by phpsourcecode — October 23, 2007

Leave a comment

You must be logged in to post a comment.