PHP.JS is an open source project in which PHP functions are ported to JavaScript. This library can speed up development for programmers who are increasingly confronted with client-side technology.
Some of the higher-level functions implemented in PHP.JS are: file_get_contents(), mktime(), serialize(), md5(), date(), base64_decode().
Developer Kevin van Zonneveld was once working on a project with a lot of client(JS) / server(PHP) interaction, and he found himself coding PHP functions (like base64_decode & urldecode) in JavaScript to smoothen communication between the two languages.
He stored the stored the functions in a file called php.js which was included in the project. But even when the project was done, it remained fun trying to port PHP functions to JavaScript, and so the library grew.
Kevin decided to share the little library on his blog, triggering the enthusiasm of a lot of PHP developers longing for PHP functionality in JavaScript. The project was open sourced in 2008, and many people contributed their own functions in the comments sections of Kevin’s blog.
- Requirements: No server component is required
- Source: http://phpjs.org/
- Download: http://phpjs.org/packages/view/php.default.min.js
