前の記事 ≪:ピュアCSSでクールなグラフサンプル「Pure Css Data Chart」
次の記事 ≫:PHPで仕事をするときの注意

PHPで使える便利関数をJavaScriptでも使えるようにする「php.js」

2008年02月05日-はてなブックマーク

スポンサード リンク
[PR] 英単語を忘却曲線アプリを使って超効率よく記憶する方法
PHP.JS Licensing
This article is part of the 'Porting PHP to Javascript' Project, which aims to decrease the gap between developing for PHP & Javascript.

PHPで使える便利関数をJavaScriptでも使えるようにする「php.js」。

php.js をインクルードすれば、次のPHP関数と同名かつ同機能を使うことが出来ます。

abs, addslashes, array_change_key_case, array_chunk, array_combine, array_count_values, array_diff, array_diff_assoc, array_diff_key, array_fill, array_flip, array_keys, array_key_exists, array_map, array_pad, array_pop, array_product, array_push, array_rand, array_reverse, array_search, array_shift, array_sum, array_unique, array_unshift, array_values, base64_decode, base64_encode, basename, checkdate, chr, compact, count, count_chars, crc32, date, defined, define, empty, end, explode, file, file_get_contents, function_exists, get_class, htmlentities, implode, include, include_once, in_array, isset, is_array, is_numeric, levenshtein, ltrim, md5, mktime, nl2br, number_format, ord, preg_quote, printf, rand, range, reset, rtrim, serialize, setcookie, sha1, shuffle, soundex, sprintf, strcmp, stripslashes, strip_tags, stristr, strlen, strpos, strrev, strripos, strrpos, strstr, strtolower, strtoupper, str_pad, str_repeat, str_replace, str_rot13, substr_count, trim, ucfirst, ucwords, utf8_decode, utf8_encode, wordwrap

JavaScriptに慣れ親しみたいと思っているPHPプログラマの方は、これを元に、JavaScriptに移行していくのも手かもしれませんね。

関連エントリ

関連の記事検索:JavaScript, ライブラリ
スポンサード リンク

By.KJ : 2008年02月05日 10:04 livedoor Readerで購読 Twitterに投稿

間違いの指摘をしていただける方はメール、あるいはTwitter/FBでお願いします(クリック)