Article Diary - General Knowledge Digest

Use PHP Functions In JavaScript with PHP.JS Library

PHP Functions in JavaScriptPHP.JS is a JavaScript library that enables anyone to use PHP functions on client-side. It can be very helpful to any developer who wants to get the PHP functions on static pages with JavaScript to get the extra functionality (like being able to use file_get_contents(), mktime(), serialize() ) & take the load off the server. Currently about 400 PHP functions are ported to JavaScript & there are still ones being experimented or waiting to be included. But it is possible to find the most popular ones (even md5()). The download packages can be totally customized & it is possible to get only the functions you need besides all of them.

No server component required to use PHP functions in JavaScript. To use php.js you can either:
  • Goto one of the Functions and just Copy-Paste it :)
  • Customize & download a package (only select what you need)
  • Download the default package (big size use for study only)
If you know how to use functions in PHP, you should know how to do it in JavaScript with php.js

Requirements: No Requirements
Compatibility: All Major Browsers

PHP.JS Website
Download PHP.JS
Attached Files
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Security Code Security Code
Related Articles RSS Feed
How can I change session timeout value?
Viewed 967 times since Tue, Apr 27, 2010
SEO Poisoning - What are SEO Poisoning Attacks?
Viewed 1312 times since Mon, Apr 5, 2010
SlideDeck - Cool jQuery Slideshow Plugin
Viewed 1121 times since Thu, Feb 4, 2010
Create A Page Peel Effect With CSS & jQuery
Viewed 997 times since Tue, Jan 5, 2010
30 High Quality Charts & Graphs for Web Developers
Viewed 2779 times since Wed, Mar 23, 2011
Making A Basic PHP Template System
Viewed 943 times since Tue, Dec 8, 2009
Ajaxed MySQL Table Editor
Viewed 1259 times since Tue, Oct 13, 2009
ProFolio - Instantly Create Free Portfolio Website
Viewed 1413 times since Sun, Jan 3, 2010
CSS Positioning - Absolute, Relative & Fixed
Viewed 1308 times since Thu, Dec 3, 2009
Open Source WYSIWYG Editor
Viewed 1299 times since Thu, Jan 7, 2010