PHP.JS Library

By Роската Last update Jun 25, 2009 — Installed 34 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 0
Script Summary:
JS library used to decrease the gap between developing for PHP & Javascript (Porting PHP to Javascript).
Version: 2.77
Copyright: 2009 Kevin van Zonneveld.

Script homepage

This script has no discussions.

start the discussion

This script has no reviews.

Description

A lot of people are familiar with PHP's functions, and though Javascript functions are often quite similar, some functions may be missing or addressed differently. The Javascript implementations should be as compliant with the PHP versions as possible, a good indication is that the PHP function manual could also apply to the Javascript version.

Credits

All credits go to Kevin van Zonneveld! I've just uploaded the Library to User Scripts, so all developers can use it!

Ported functions in this package

abs, acos, acosh, addslashes, array_change_key_case, array_chunk, array_combine, array_count_values, array_diff, array_diff_assoc, array_diff_key, array_diff_uassoc, array_diff_ukey, array_fill, array_fill_keys, array_filter, array_flip, array_intersect, array_intersect_assoc, array_intersect_key, array_intersect_uassoc, array_intersect_ukey, array_key_exists, array_keys, array_map, array_merge, array_merge_recursive, array_pad, array_pop, array_product, array_push, array_rand, array_reduce, array_reverse, array_search, array_shift, array_slice, array_splice, array_sum, array_udiff, array_udiff_assoc, array_udiff_uassoc, array_uintersect, array_uintersect_assoc, array_uintersect_uassoc, array_unique, array_unshift, array_values, array_walk, array_walk_recursive, arsort, asin, asinh, asort, atan, atan2, atanh, base64_decode, base64_encode, base_convert, bin2hex, bindec, ceil, checkdate, chop, chr, chunk_split, class_exists, compact, cos, cosh, count, count_chars, crc32, date, decbin, dechex, decoct, deg2rad, doubleval, echo, end, exp, explode, expm1, floatval, floor, fmod, get_class, get_defined_vars, get_headers, get_html_translation_table, getdate, getrandmax, hexdec, html_entity_decode, htmlentities, htmlspecialchars, htmlspecialchars_decode, http_build_query, hypot, implode, in_array, intval, ip2long, is_bool, is_double, is_finite, is_float, is_infinite, is_int, is_integer, is_long, is_nan, is_null, is_numeric, is_real, is_scalar, is_string, join, json_decode, json_encode, krsort, ksort, lcfirst, lcg_value, levenshtein, log, log10, log1p, long2ip, ltrim, max, md5, method_exists, microtime, min, mktime, mt_getrandmax, mt_rand, natcasesort, natsort, nl2br, number_format, octdec, ord, parse_str, parse_url, pi, pow, preg_grep, preg_quote, print_r, printf, property_exists, quotemeta, rad2deg, rand, range, rawurldecode, rawurlencode, reset, round, rsort, rtrim, serialize, setcookie, setrawcookie, settype, sha1, shuffle, sin, sinh, sizeof, sort, soundex, split, sprintf, sql_regcase, sqrt, str_getcsv, str_ireplace, str_pad, str_repeat, str_replace, str_rot13, str_shuffle, str_split, str_word_count, strcasecmp, strchr, strcmp, strcspn, strip_tags, stripos, stripslashes, stristr, strlen, strnatcasecmp, strnatcmp, strncasecmp, strncmp, strpbrk, strpos, strrchr, strrev, strripos, strrpos, strspn, strstr, strtok, strtolower, strtotime, strtoupper, strtr, substr, substr_compare, substr_count, substr_replace, tan, tanh, time, trim, uasort, ucfirst, ucwords, uksort, unserialize, urldecode, urlencode, usort, utf8_decode, utf8_encode, var_dump, var_export, vprintf, vsprintf, wordwrap