php.js: Porting PHP to Javascript

Richard Wong 11 June, 2008

has started the “Porting PHP to Javascript” project with the idea of porting crucial PHP functions into Javascript. The project has already ported 138 PHP functions and is continuously adding more.

For example:

  • – download the contents of a file on your site using AJAX and load it into a string
  • – search and replace strings, regular expressions, or arrays.
  • – Calculate the md5 hash of a string

For those of you writing a lot of PHP, this will make your life easier when you write Javascript. All you need to do is include and you can use all the those ported PHP functions in Javascript.

Post a comment