PHPで使える便利関数をJavaScriptでも使えるようにする「php.js」
2008年02月05日-
スポンサード リンク
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, ライブラリ
スポンサード リンク
Advertisements
SITE PROFILE
最新のブログ記事(新着順)
- スムーズに横スクロールするレイアウトサンプル
- 斬新なページメニューが作れる「Inline Menu Layout with Gallery Panel」
- 世界中で今何時を計算できる「Spacetime」
- シンプルなタブUIを実現できる「Skeletabs」
- テキストを省略してブロックを小さくできる「Cuttr.js」
- インタラクティブに動く立体的なテキストを生成「ztext.js」
- WebGLを使った動画の切り替えアニメーション実装
- スクロールにあわせて動くイメージタイル実装
- 1000以上の汎用アイコンセット「emblemicons」
- フリーのSVG背景イメージが入手できる「BGJar」
- 過去のエントリ