11 June, 2008 12:48 am

php.js: Porting PHP to Javascript

Posted by Richard Wong under Javascript, PHP | 0 Comment

Kevin van Zonnevelhas 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:

  • file_get_contents - download the contents of a file on your site using AJAX and load it into a string
  • str_replace - search and replace strings, regular expressions, or arrays.
  • md5 - 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 php.js and you can use all the those ported PHP functions in Javascript.

1 June, 2008 10:16 pm

Useful PHP Classes and Components

Posted by Richard Wong under PHP | 0 Comment

PHP:Impact has compiled a list of 30 useful PHP classes and components ranging from development, testing & debug to deployment & documentation.

They include:

  • Development: Creole, HTML Purifier, Securimage, SimplePie, Savant, and more
  • Testing & Debug: PHP Debug, PHPUnit, and more
  • Deployment & documentation: Phing, phpDocumentor, and more

PHP:Impact