The PHP desk reference
A clear answer. A useful example.
Concise explanations and executable examples for the functions and concepts you use, grouped by topic.
Arrays
array_all()array_any()array_change_key_case()array_chunk()array_column()array_combine()array_count_values()array_diff_assoc()array_diff_key()array_diff_uassoc()array_diff_ukey()array_diff()array_fill_keys()array_fill()array_filter()array_find_key()array_find()array_flip()array_intersect_assoc()array_intersect_key()array_intersect_uassoc()array_intersect_ukey()array_intersect()array_is_list()array_key_exists()array_key_first()array_key_last()array_keys()array_map()array_merge_recursive()array_merge()array_multisort()array_pad()array_pop()array_product()array_push()array_reduce()array_replace_recursive()array_replace()array_reverse()array_search()array_shift()array_slice()array_splice()array_sum()array_udiff_assoc()array_udiff_uassoc()array_udiff()array_uintersect_assoc()array_uintersect_uassoc()array_uintersect()array_unique()array_unshift()array_values()array_walk_recursive()array_walk()arsort()asort()compact()count()current()end()extract()in_array()key_exists()key()krsort()ksort()natcasesort()natsort()next()pos()prev()range()reset()rsort()sizeof()sort()uasort()uksort()usort()
Character checks
Classes
Dates
checkdate()date_add()date_create_from_format()date_create_immutable_from_format()date_create_immutable()date_create()date_date_set()date_diff()date_format()date_get_last_errors()date_interval_create_from_date_string()date_interval_format()date_isodate_set()date_modify()date_offset_get()date_parse_from_format()date_parse()date_sub()date_sun_info()date_time_set()date_timestamp_get()date_timestamp_set()date_timezone_get()date_timezone_set()date()gmdate()gmmktime()idate()mktime()strtotime()timezone_abbreviations_list()timezone_identifiers_list()timezone_location_get()timezone_name_from_abbr()timezone_name_get()timezone_offset_get()timezone_open()timezone_transitions_get()timezone_version_get()
Functions
Hashing
JSON
Loops
Mathematics
abs()acos()acosh()asin()asinh()atan()atan2()atanh()base_convert()bindec()ceil()cos()cosh()decbin()dechex()decoct()deg2rad()exp()expm1()fdiv()floor()fmod()fpow()hexdec()hypot()intdiv()is_finite()is_infinite()is_nan()log()log10()log1p()max()octdec()pi()pow()rad2deg()round()sin()sinh()sqrt()tan()tanh()
Multibyte strings
mb_check_encoding()mb_chr()mb_convert_case()mb_convert_encoding()mb_convert_kana()mb_convert_variables()mb_decode_mimeheader()mb_decode_numericentity()mb_detect_encoding()mb_encode_mimeheader()mb_encode_numericentity()mb_ereg_match()mb_ereg_replace_callback()mb_ereg_replace()mb_ereg_search_getpos()mb_ereg_search_getregs()mb_ereg_search_init()mb_ereg_search_pos()mb_ereg_search_regs()mb_ereg_search_setpos()mb_ereg_search()mb_ereg()mb_eregi_replace()mb_eregi()mb_get_info()mb_lcfirst()mb_ltrim()mb_ord()mb_parse_str()mb_preferred_mime_name()mb_regex_set_options()mb_rtrim()mb_scrub()mb_split()mb_str_pad()mb_str_split()mb_strcut()mb_strimwidth()mb_stripos()mb_stristr()mb_strlen()mb_strpos()mb_strrchr()mb_strrichr()mb_strripos()mb_strrpos()mb_strstr()mb_strtolower()mb_strtoupper()mb_strwidth()mb_substr_count()mb_substr()mb_trim()mb_ucfirst()
Regular expressions
Strings
addcslashes()addslashes()bin2hex()chop()chr()chunk_split()convert_uudecode()convert_uuencode()count_chars()crc32()crypt()explode()fprintf()get_html_translation_table()hebrev()hex2bin()html_entity_decode()htmlentities()htmlspecialchars_decode()htmlspecialchars()implode()join()lcfirst()levenshtein()ltrim()md5_file()md5()metaphone()nl2br()number_format()ord()parse_str()printf()quoted_printable_decode()quoted_printable_encode()quotemeta()rtrim()sha1_file()sha1()similar_text()soundex()sprintf()sscanf()str_contains()str_decrement()str_ends_with()str_getcsv()str_increment()str_ireplace()str_pad()str_repeat()str_replace()str_rot13()str_shuffle()str_split()str_starts_with()str_word_count()strcasecmp()strchr()strcmp()strcspn()strip_tags()stripcslashes()stripos()stripslashes()stristr()strlen()strnatcasecmp()strnatcmp()strncasecmp()strncmp()strpbrk()strpos()strrchr()strrev()strripos()strrpos()strspn()strstr()strtok()strtolower()strtoupper()strtr()substr_compare()substr_count()substr_replace()substr()trim()ucfirst()ucwords()vfprintf()vprintf()vsprintf()wordwrap()
Types
Validation
Syntax changes by PHP version
What each release changed in the language, with earlier and current code side by side.
PHP version compatibility
Browse PHP 5.6, each PHP 7 release, and PHP 8.0–8.6. Historical versions are for maintenance and migration research.
Independent learning material. For the full language specification and API details, visit the official PHP manual.