31
May
09

Well ! There is an open source project called PHP.JS which port PHP functions to JavaScript. PHP.JS library in your own projects, you can use your favorite PHP functions client-side. No server component required , Using PHP.JS may speed up development for PHP developers who are increasingly confronted with client-side technology. It also offers added functionality because JavaScript does not natively support higher-level functions such as: file_get_contents(), mktime(), serialize().

PHP.JS is nothing fancy like jQuery—they’re just offering PHP functions, with all of their original flaws and benefits for whomever needs them.With 414 ported functions, PHP.JS is 83.5% complete.

Featured Functions

md5()
Generate hashes client side to take load off of your server.

date()
Date-formatting, just like you know it from PHP

base64_decode()
Safe & easy data transport, decode messages in JavaScript that where encoded by PHP.

The History of PHP.JS

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.

Special Thanks to whom wrote this great functions in javascript, developer Kevin van Zonneveld.

  • del.icio.us
  • Digg
  • Facebook
  • LinkedIn
  • Google Bookmarks
  • Twitter
  • MySpace
  • Mixx
  • Reddit
  • DZone
  • Sphinn
  • StumbleUpon
  • Blogplay
  • Diigo
  • Live
  • MSN Reporter
  • Technorati
  • NewsVine
  • Yahoo! Bookmarks
  • Netvibes
  • Design Float
  • Add to favorites
  • email
  • Yahoo! Buzz
  • Gwar
  • FriendFeed
  • Tumblr
  • Print
  • PDF
  • RSS
This entry was posted in Javascript, PHP and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>