Javascript for PHP lovers

I’m not a PHP guy and I like to use standards for the languages I’m using so this php.js thing is not for me at all. In fact, I really dislike PHP and though I use it often, there is no reason in the world I would want to use its syntax to write javascript.

Import the librairie (packed) and write javascript like you never wrote it before.

Example, you want to use the good ol’ strrpos to find position of last occurrence of a char in a string (example from the site)

  1. strrpos(‘Kevin van Zonneveld’, ‘e’);

would return 16.

But what happens if a non-PHP guy as to modify your PHPed javascript?

Comments

  1. FrankLamontagne January 30, 2008 at 08:09:49

    “What happens if a non-PHP guy has to modify your PHPed javascript?”

    He instantly becomes a ihatephp fan!

  2. Jeremy Daley March 4, 2009 at 09:37:34

    who wrote this function? there ARE some array functions that PHP has that JS doesn’t, but in this case i’d just as soon use JS’s native indexOf() or lastIndexOf() methods.

Post a comment

Comments are moderated and innapropriate ones won't be approved. Please respect this public space.