PHP 8.5 built-in functions

The 915 functions of PHP 8.5 that come with the standard library and the bundled extensions this reference covers: standard, date, pcre, spl, mbstring, json, dom, xml, session, reflection, tokenizer, filter, ctype, hash, iconv, zlib, random, readline. One page each: signature, parameters and return value, plus an example and a changelog where the manual has them. The pages are generated from the official PHP manual, so the wording of the reference text follows php.net (CC BY 3.0, credited on every page).

Not in this index: the functions of extensions you add at build time or install as a package, such as curl, openssl, PDO, sqlite3, sockets, intl or gd. They are in the full PHP manual, which also covers the PECL extensions.

Jump to a letter

A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Z

By group

The manual groups the same functions by topic; the count is the number of pages this index has for that group.

GroupFunctions
String Functions100
Array Functions85
Filesystem Functions81
Multibyte String Functions65
Date/Time Functions51
PHP Options/Info Functions50
Stream Functions46
Math Functions44
Network Functions37
Variable handling Functions33
Zlib Functions30
Misc. Functions29
Session Functions23
XML Parser Functions22
Classes/Object Functions19
Output Control Functions16
Hash Functions15
SPL Functions15
Error Handling Functions14
Readline Functions13
Function handling Functions12
Ctype Functions11
PCRE Functions11
Program execution Functions11
URL Functions10
iconv Functions10
Directory Functions9
Random Functions9
libxml Functions8
Filter Functions7
GD and Image Functions6
JSON Functions5
Mhash Functions5
Password Hashing Functions5
SimpleXML Functions3
Tokenizer Functions2
DOM Functions1
Mail Functions1
Semaphore Functions1

A

FunctionWhat it doesGroup
abs()Absolute valueMath
acos()Arc cosineMath
acosh()Inverse hyperbolic cosineMath
addcslashes()Quote string with slashes in a C styleString
addslashes()Quote string with slashesString
array_all()Checks if all array elements satisfy a callback functionArray
array_any()Checks if at least one array element satisfies a callback functionArray
array_change_key_case()Changes the case of all keys in an arrayArray
array_chunk()Split an array into chunksArray
array_column()Return the values from a single column in the input arrayArray
array_combine()Creates an array by using one array for keys and another for its valuesArray
array_count_values()Counts the occurrences of each distinct value in an arrayArray
array_diff()Computes the difference of arraysArray
array_diff_assoc()Computes the difference of arrays with additional index checkArray
array_diff_key()Computes the difference of arrays using keys for comparisonArray
array_diff_uassoc()Computes the difference of arrays with additional index check which is performed by a user supplied callback functionArray
array_diff_ukey()Computes the difference of arrays using a callback function on the keys for comparisonArray
array_fill()Fill an array with valuesArray
array_fill_keys()Fill an array with values, specifying keysArray
array_filter()Filters elements of an array using a callback functionArray
array_find()Returns the first element satisfying a callback functionArray
array_find_key()Returns the key of the first element satisfying a callback functionArray
array_first()Gets the first value of an arrayArray
array_flip()Exchanges all keys with their associated values in an arrayArray
array_intersect()Computes the intersection of arraysArray
array_intersect_assoc()Computes the intersection of arrays with additional index checkArray
array_intersect_key()Computes the intersection of arrays using keys for comparisonArray
array_intersect_uassoc()Computes the intersection of arrays with additional index check, compares indexes by a callback functionArray
array_intersect_ukey()Computes the intersection of arrays using a callback function on the keys for comparisonArray
array_is_list()Checks whether a given array is a listArray
array_key_exists()Checks if the given key or index exists in the arrayArray
array_key_first()Gets the first key of an arrayArray
array_key_last()Gets the last key of an arrayArray
array_keys()Return all the keys or a subset of the keys of an arrayArray
array_last()Gets the last value of an arrayArray
array_map()Applies the callback to the elements of the given arraysArray
array_merge()Merge one or more arraysArray
array_merge_recursive()Merge one or more arrays recursivelyArray
array_multisort()Sort multiple or multi-dimensional arraysArray
array_pad()Pad array to the specified length with a valueArray
array_pop()Pop the element off the end of arrayArray
array_product()Calculate the product of values in an arrayArray
array_push()Push one or more elements onto the end of arrayArray
array_rand()Pick one or more random keys out of an arrayArray
array_reduce()Iteratively reduce the array to a single value using a callback functionArray
array_replace()Replaces elements from passed arrays into the first arrayArray
array_replace_recursive()Replaces elements from passed arrays into the first array recursivelyArray
array_reverse()Return an array with elements in reverse orderArray
array_search()Searches the array for a given value and returns the first corresponding key if successfulArray
array_shift()Shift an element off the beginning of arrayArray
array_slice()Extract a slice of the arrayArray
array_splice()Remove a portion of the array and replace it with something elseArray
array_sum()Calculate the sum of values in an arrayArray
array_udiff()Computes the difference of arrays by using a callback function for data comparisonArray
array_udiff_assoc()Computes the difference of arrays with additional index check, compares data by a callback functionArray
array_udiff_uassoc()Computes the difference of arrays with additional index check, compares data and indexes by a callback functionArray
array_uintersect()Computes the intersection of arrays, compares data by a callback functionArray
array_uintersect_assoc()Computes the intersection of arrays with additional index check, compares data by a callback functionArray
array_uintersect_uassoc()Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functionsArray
array_unique()Removes duplicate values from an arrayArray
array_unshift()Prepend one or more elements to the beginning of an arrayArray
array_values()Return all the values of an arrayArray
array_walk()Apply a user supplied function to every member of an arrayArray
array_walk_recursive()Apply a user function recursively to every member of an arrayArray
arsort()Sort an array in descending order and maintain index associationArray
asin()Arc sineMath
asinh()Inverse hyperbolic sineMath
asort()Sort an array in ascending order and maintain index associationArray
assert()Checks an assertionPHP Options/Info
assert_options()Set/get the various assert flagsPHP Options/Info
atan()Arc tangentMath
atan2()Arc tangent of two variablesMath
atanh()Inverse hyperbolic tangentMath

B

FunctionWhat it doesGroup
base64_decode()Decodes data encoded with MIME base64URL
base64_encode()Encodes data with MIME base64URL
base_convert()Convert a number between arbitrary basesMath
basename()Returns trailing name component of pathFilesystem
bin2hex()Convert binary data into hexadecimal representationString
bindec()Binary to decimalMath
boolval()Get the boolean value of a variableVariable handling

C

FunctionWhat it doesGroup
call_user_func()Call the callback given by the first parameterFunction handling
call_user_func_array()Call a callback with an array of parametersFunction handling
ceil()Round fractions upMath
chdir()Change directoryDirectory
checkdate()Validate a Gregorian dateDate/Time
checkdnsrr()Check DNS records corresponding to a given Internet host name or IP addressNetwork
chgrp()Changes file groupFilesystem
chmod()Changes file modeFilesystem
chop()Alias of rtrim()String
chown()Changes file ownerFilesystem
chr()Generate a single-byte string from a numberString
chroot()Change the root directoryDirectory
chunk_split()Split a string into smaller chunksString
class_alias()Creates an alias for a classClasses/Object
class_exists()Checks if the class has been definedClasses/Object
class_implements()Return the interfaces which are implemented by the given class or interfaceSPL
class_parents()Return the parent classes of the given classSPL
class_uses()Return the traits used by the given classSPL
clearstatcache()Clears file status cacheFilesystem
closedir()Close directory handleDirectory
closelog()Close connection to system loggerNetwork
compact()Create array containing variables and their valuesArray
connection_aborted()Check whether client disconnectedMisc.
connection_status()Returns connection status bitfieldMisc.
constant()Returns the value of a constantMisc.
convert_uudecode()Decode a uuencoded stringString
convert_uuencode()Uuencode a stringString
copy()Copies fileFilesystem
cos()CosineMath
cosh()Hyperbolic cosineMath
count()Counts all elements in an array or in a Countable objectArray
count_chars()Return information about characters used in a stringString
crc32()Calculates the crc32 polynomial of a stringString
crypt()One-way string hashingString
ctype_alnum()Check for alphanumeric character(s)Ctype
ctype_alpha()Check for alphabetic character(s)Ctype
ctype_cntrl()Check for control character(s)Ctype
ctype_digit()Check for numeric character(s)Ctype
ctype_graph()Check for any printable character(s) except spaceCtype
ctype_lower()Check for lowercase character(s)Ctype
ctype_print()Check for printable character(s)Ctype
ctype_punct()Check for any printable character which is not whitespace or an alphanumeric characterCtype
ctype_space()Check for whitespace character(s)Ctype
ctype_upper()Check for uppercase character(s)Ctype
ctype_xdigit()Check for character(s) representing a hexadecimal digitCtype
current()Return the current element in an arrayArray

D

FunctionWhat it doesGroup
date()Format a Unix timestampDate/Time
date_add()Alias of DateTime::add()Date/Time
date_create()create a new DateTime objectDate/Time
date_create_from_format()Alias of DateTime::createFromFormat()Date/Time
date_create_immutable()create a new DateTimeImmutable objectDate/Time
date_create_immutable_from_format()Alias of DateTimeImmutable::createFromFormat()Date/Time
date_date_set()Alias of DateTime::setDate()Date/Time
date_default_timezone_get()Gets the default timezone used by all date/time functions in a scriptDate/Time
date_default_timezone_set()Sets the default timezone used by all date/time functions in a scriptDate/Time
date_diff()Alias of DateTime::diff()Date/Time
date_format()Alias of DateTime::format()Date/Time
date_get_last_errors()Alias of DateTimeImmutable::getLastErrors()Date/Time
date_interval_create_from_date_string()Alias of DateInterval::createFromDateString()Date/Time
date_interval_format()Alias of DateInterval::format()Date/Time
date_isodate_set()Alias of DateTime::setISODate()Date/Time
date_modify()Alias of DateTime::modify()Date/Time
date_offset_get()Alias of DateTime::getOffset()Date/Time
date_parse()Returns associative array with detailed info about given date/timeDate/Time
date_parse_from_format()Get info about given date formatted according to the specified formatDate/Time
date_sub()Alias of DateTime::sub()Date/Time
date_sun_info()Returns an array with information about sunset/sunrise and twilight begin/endDate/Time
date_sunrise()Returns time of sunrise for a given day and locationDate/Time
date_sunset()Returns time of sunset for a given day and locationDate/Time
date_time_set()Alias of DateTime::setTime()Date/Time
date_timestamp_get()Alias of DateTime::getTimestamp()Date/Time
date_timestamp_set()Alias of DateTime::setTimestamp()Date/Time
date_timezone_get()Alias of DateTime::getTimezone()Date/Time
date_timezone_set()Alias of DateTime::setTimezone()Date/Time
debug_backtrace()Generates a backtraceError Handling
debug_print_backtrace()Prints a backtraceError Handling
debug_zval_dump()Dumps a string representation of an internal zval structure to outputVariable handling
decbin()Decimal to binaryMath
dechex()Decimal to hexadecimalMath
decoct()Decimal to octalMath
define()Defines a named constantMisc.
defined()Checks whether a constant with the given name existsMisc.
deflate_add()Incrementally deflate dataZlib
deflate_init()Initialize an incremental deflate contextZlib
deg2rad()Converts the number in degrees to the radian equivalentMath
die()Alias of exit()Misc.
dir()Return an instance of the Directory classDirectory
dirname()Returns a parent directory's pathFilesystem
disk_free_space()Returns available space on filesystem or disk partitionFilesystem
disk_total_space()Returns the total size of a filesystem or disk partitionFilesystem
diskfreespace()Alias of disk_free_space()Filesystem
dl()Loads a PHP extension at runtimePHP Options/Info
dns_check_record()Alias of checkdnsrr()Network
dns_get_mx()Alias of getmxrr()Network
dns_get_record()Fetch DNS Resource Records associated with a hostnameNetwork
dom_import_simplexml()Gets a DOMAttr or DOMElement object from a SimpleXMLElement objectDOM
doubleval()Alias of floatval()Variable handling

E

FunctionWhat it doesGroup
end()Set the internal pointer of an array to its last elementArray
enum_exists()Checks if the enum has been definedClasses/Object
error_clear_last()Clear the most recent errorError Handling
error_get_last()Get the last occurred errorError Handling
error_log()Send an error message to the defined error handling routinesError Handling
error_reporting()Sets which PHP errors are reportedError Handling
escapeshellarg()Escape a string to be used as a shell argumentProgram execution
escapeshellcmd()Escape shell metacharactersProgram execution
exec()Execute an external programProgram execution
exit()Terminate the current script with a status code or messageMisc.
exp()Calculates the exponent of eMath
explode()Split a string by a stringString
expm1()Returns exp($num) - 1, computed in a way that is accurate even when the value of number is close to zeroMath
extension_loaded()Find out whether an extension is loadedPHP Options/Info
extract()Import variables into the current symbol table from an arrayArray

F

FunctionWhat it doesGroup
fclose()Closes an open file pointerFilesystem
fdatasync()Synchronizes data (but not meta-data) to the fileFilesystem
fdiv()Divides two numbers, according to IEEE 754Math
feof()Tests for end-of-file on a file pointerFilesystem
fflush()Flushes the output to a fileFilesystem
fgetc()Gets character from file pointerFilesystem
fgetcsv()Gets line from file pointer and parse for CSV fieldsFilesystem
fgets()Gets line from file pointerFilesystem
file()Reads entire file into an arrayFilesystem
file_exists()Checks whether a file or directory existsFilesystem
file_get_contents()Reads entire file into a stringFilesystem
file_put_contents()Write data to a fileFilesystem
fileatime()Gets last access time of fileFilesystem
filectime()Gets inode change time of fileFilesystem
filegroup()Gets file groupFilesystem
fileinode()Gets file inodeFilesystem
filemtime()Gets file modification timeFilesystem
fileowner()Gets file ownerFilesystem
fileperms()Gets file permissionsFilesystem
filesize()Gets file sizeFilesystem
filetype()Gets file typeFilesystem
filter_has_var()Checks if a variable of the specified type existsFilter
filter_id()Returns the filter ID belonging to a named filterFilter
filter_input()Gets a specific external variable by name and optionally filters itFilter
filter_input_array()Gets external variables and optionally filters themFilter
filter_list()Returns a list of all supported filtersFilter
filter_var()Filters a variable with a specified filterFilter
filter_var_array()Gets multiple variables and optionally filters themFilter
floatval()Get float value of a variableVariable handling
flock()Portable advisory file lockingFilesystem
floor()Round fractions downMath
flush()Flush system output bufferOutput Control
fmod()Returns the floating point remainder (modulo) of the division of the argumentsMath
fnmatch()Match filename against a patternFilesystem
fopen()Opens file or URLFilesystem
forward_static_call()Call a callback while preserving the current called classFunction handling
forward_static_call_array()Call a callback with an array of parameters, preserving the current called classFunction handling
fpassthru()Output all remaining data on a file pointerFilesystem
fpow()Raise one number to the power of another, according to IEEE 754Math
fprintf()Write a formatted string to a streamString
fputcsv()Format line as CSV and write to file pointerFilesystem
fputs()Alias of fwrite()Filesystem
fread()Binary-safe file readFilesystem
fscanf()Parses input from a file according to a formatFilesystem
fseek()Seeks on a file pointerFilesystem
fsockopen()Open Internet or Unix domain socket connectionNetwork
fstat()Gets information about a file using an open file pointerFilesystem
fsync()Synchronizes changes to the file (including meta-data)Filesystem
ftell()Returns the current position of the file read/write pointerFilesystem
ftok()Convert a pathname and a project identifier to a System V IPC keySemaphore
ftruncate()Truncates a file to a given lengthFilesystem
func_get_arg()Return an item from the argument listFunction handling
func_get_args()Returns an array comprising a function's argument listFunction handling
func_num_args()Returns the number of arguments passed to the functionFunction handling
function_exists()Return true if the given function has been definedFunction handling
fwrite()Binary-safe file writeFilesystem

G

FunctionWhat it doesGroup
gc_collect_cycles()Forces collection of any existing garbage cyclesPHP Options/Info
gc_disable()Deactivates the circular reference collectorPHP Options/Info
gc_enable()Activates the circular reference collectorPHP Options/Info
gc_enabled()Returns status of the circular reference collectorPHP Options/Info
gc_mem_caches()Reclaims memory used by the Zend Engine memory managerPHP Options/Info
gc_status()Gets information about the garbage collectorPHP Options/Info
get_browser()Tells what the user's browser is capable ofMisc.
get_called_class()The "Late Static Binding" class nameClasses/Object
get_cfg_var()Gets the value of a PHP configuration optionPHP Options/Info
get_class()Returns the name of the class of an objectClasses/Object
get_class_methods()Gets the class methods' namesClasses/Object
get_class_vars()Get the default properties of the classClasses/Object
get_current_user()Gets the name of the owner of the current PHP scriptPHP Options/Info
get_debug_type()Gets the type name of a variable in a way that is suitable for debuggingVariable handling
get_declared_classes()Returns an array with the name of the defined classesClasses/Object
get_declared_interfaces()Returns an array of all declared interfacesClasses/Object
get_declared_traits()Returns an array of all declared traitsClasses/Object
get_defined_constants()Returns an associative array with the names of all the constants and their valuesPHP Options/Info
get_defined_functions()Returns an array of all defined functionsFunction handling
get_defined_vars()Returns an array of all defined variablesVariable handling
get_error_handler()Gets the user-defined error handler functionError Handling
get_exception_handler()Gets the user-defined exception handler functionError Handling
get_extension_funcs()Returns an array with the names of the functions of a modulePHP Options/Info
get_headers()Fetches all the headers sent by the server in response to an HTTP requestURL
get_html_translation_table()Returns the translation table used by htmlspecialchars() and htmlentities()String
get_include_path()Gets the current include_path configuration optionPHP Options/Info
get_included_files()Returns an array with the names of included or required filesPHP Options/Info
get_loaded_extensions()Returns an array with the names of all modules compiled and loadedPHP Options/Info
get_mangled_object_vars()Returns an array of mangled object propertiesClasses/Object
get_meta_tags()Extracts all meta tag content attributes from a file and returns an arrayURL
get_object_vars()Gets the properties of the given objectClasses/Object
get_parent_class()Retrieves the parent class name for object or classClasses/Object
get_required_files()Alias of get_included_files()PHP Options/Info
get_resource_id()Returns an integer identifier for the given resourceVariable handling
get_resource_type()Returns the resource typeVariable handling
get_resources()Returns active resourcesPHP Options/Info
getcwd()Gets the current working directoryDirectory
getdate()Get date/time informationDate/Time
getenv()Gets the value of a single or all environment variablesPHP Options/Info
gethostbyaddr()Get the Internet host name corresponding to a given IP addressNetwork
gethostbyname()Get the IPv4 address corresponding to a given Internet host nameNetwork
gethostbynamel()Get a list of IPv4 addresses corresponding to a given Internet host nameNetwork
gethostname()Gets the host nameNetwork
getimagesize()Get the size of an imageGD and Image
getimagesizefromstring()Get the size of an image from a stringGD and Image
getlastmod()Gets time of last page modificationPHP Options/Info
getmxrr()Get MX records corresponding to a given Internet host nameNetwork
getmygid()Get PHP script owner's GIDPHP Options/Info
getmyinode()Gets the inode of the current scriptPHP Options/Info
getmypid()Gets PHP's process IDPHP Options/Info
getmyuid()Gets PHP script owner's UIDPHP Options/Info
getopt()Gets options from the command line argument listPHP Options/Info
getprotobyname()Get protocol number associated with protocol nameNetwork
getprotobynumber()Get protocol name associated with protocol numberNetwork
getrandmax()Show largest possible random valueRandom
getrusage()Gets the current resource usagesPHP Options/Info
getservbyname()Get port number associated with an Internet service and protocolNetwork
getservbyport()Get Internet service which corresponds to port and protocolNetwork
gettimeofday()Get current timeDate/Time
gettype()Get the type of a variableVariable handling
glob()Find pathnames matching a patternFilesystem
gmdate()Format a GMT/UTC date/timeDate/Time
gmmktime()Get Unix timestamp for a GMT dateDate/Time
gmstrftime()Format a GMT/UTC time/date according to locale settingsDate/Time
gzclose()Close an open gz-file pointerZlib
gzcompress()Compress a stringZlib
gzdecode()Decodes a gzip compressed stringZlib
gzdeflate()Deflate a stringZlib
gzencode()Create a gzip compressed stringZlib
gzeof()Test for EOF on a gz-file pointerZlib
gzfile()Read entire gz-file into an arrayZlib
gzgetc()Get character from gz-file pointerZlib
gzgets()Get line from file pointerZlib
gzinflate()Inflate a deflated stringZlib
gzopen()Open gz-fileZlib
gzpassthru()Output all remaining data on a gz-file pointerZlib
gzputs()Alias of gzwrite()Zlib
gzread()Binary-safe gz-file readZlib
gzrewind()Rewind the position of a gz-file pointerZlib
gzseek()Seek on a gz-file pointerZlib
gztell()Tell gz-file pointer read/write positionZlib
gzuncompress()Uncompress a compressed stringZlib
gzwrite()Binary-safe gz-file writeZlib

H

FunctionWhat it doesGroup
hash()Generate a hash value (message digest)Hash
hash_algos()Return a list of registered hashing algorithmsHash
hash_copy()Copy hashing contextHash
hash_equals()Timing attack safe string comparisonHash
hash_file()Generate a hash value using the contents of a given fileHash
hash_final()Finalize an incremental hash and return resulting digestHash
hash_hkdf()Generate a HKDF key derivation of a supplied key inputHash
hash_hmac()Generate a keyed hash value using the HMAC methodHash
hash_hmac_algos()Return a list of registered hashing algorithms suitable for hash_hmacHash
hash_hmac_file()Generate a keyed hash value using the HMAC method and the contents of a given fileHash
hash_init()Initialize an incremental hashing contextHash
hash_pbkdf2()Generate a PBKDF2 key derivation of a supplied passwordHash
hash_update()Pump data into an active hashing contextHash
hash_update_file()Pump data into an active hashing context from a fileHash
hash_update_stream()Pump data into an active hashing context from an open streamHash
header()Send a raw HTTP headerNetwork
header_register_callback()Call a header functionNetwork
header_remove()Remove previously set headersNetwork
headers_list()Returns a list of response headers sent (or ready to send)Network
headers_sent()Checks if or where headers have been sentNetwork
hebrev()Convert logical Hebrew text to visual textString
hex2bin()Decodes a hexadecimally encoded binary stringString
hexdec()Hexadecimal to decimalMath
highlight_file()Syntax highlighting of a fileMisc.
highlight_string()Syntax highlighting of a stringMisc.
hrtime()Get the system's high resolution timeMisc.
html_entity_decode()Convert HTML entities to their corresponding charactersString
htmlentities()Convert all applicable characters to HTML entitiesString
htmlspecialchars()Convert special characters to HTML entitiesString
htmlspecialchars_decode()Convert special HTML entities back to charactersString
http_build_query()Generate URL-encoded query stringURL
http_clear_last_response_headers()Clears the stored HTTP response headersNetwork
http_get_last_response_headers()Retrieve last HTTP response headersNetwork
http_response_code()Get or Set the HTTP response codeNetwork
hypot()Calculate the length of the hypotenuse of a right-angle triangleMath

I

FunctionWhat it doesGroup
iconv()Convert a string from one character encoding to anothericonv
iconv_get_encoding()Retrieve internal configuration variables of iconv extensioniconv
iconv_mime_decode()Decodes a MIME header fieldiconv
iconv_mime_decode_headers()Decodes multiple MIME header fields at onceiconv
iconv_mime_encode()Composes a MIME header fieldiconv
iconv_set_encoding()Set current setting for character encoding conversioniconv
iconv_strlen()Returns the character count of stringiconv
iconv_strpos()Finds position of first occurrence of a needle within a haystackiconv
iconv_strrpos()Finds the last occurrence of a needle within a haystackiconv
iconv_substr()Cut out part of a stringiconv
idate()Format a local time/date part as integerDate/Time
ignore_user_abort()Set whether a client disconnect should abort script executionMisc.
image_type_to_extension()Get file extension for image typeGD and Image
image_type_to_mime_type()Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetypeGD and Image
implode()Join array elements with a stringString
in_array()Checks if a value exists in an arrayArray
inet_ntop()Converts a packed internet address to a human readable representationNetwork
inet_pton()Converts a human readable IP address to its packed in_addr representationNetwork
inflate_add()Incrementally inflate encoded dataZlib
inflate_get_read_len()Get number of bytes read so farZlib
inflate_get_status()Get decompression statusZlib
inflate_init()Initialize an incremental inflate contextZlib
ini_alter()Alias of ini_set()PHP Options/Info
ini_get()Gets the value of a configuration optionPHP Options/Info
ini_get_all()Gets all configuration optionsPHP Options/Info
ini_parse_quantity()Get interpreted size from ini shorthand syntaxPHP Options/Info
ini_restore()Restores the value of a configuration optionPHP Options/Info
ini_set()Sets the value of a configuration optionPHP Options/Info
intdiv()Integer divisionMath
interface_exists()Checks if the interface has been definedClasses/Object
intval()Get the integer value of a variableVariable handling
ip2long()Converts a string containing an (IPv4) Internet Protocol dotted address into a long integerNetwork
iptcembed()Embeds binary IPTC data into a JPEG imageGD and Image
iptcparse()Parse a binary IPTC block into single tagsGD and Image
is_a()Checks whether the object is of a given type or subtypeClasses/Object
is_array()Finds whether a variable is an arrayVariable handling
is_bool()Finds out whether a variable is a booleanVariable handling
is_callable()Verify that a value can be called as a function from the current scopeVariable handling
is_countable()Verify that the contents of a variable is a countable valueVariable handling
is_dir()Tells whether the filename is a directoryFilesystem
is_double()Alias of is_float()Variable handling
is_executable()Tells whether the filename is executableFilesystem
is_file()Tells whether the filename is a regular fileFilesystem
is_finite()Checks whether a float is finiteMath
is_float()Finds whether the type of a variable is floatVariable handling
is_infinite()Checks whether a float is infiniteMath
is_int()Find whether the type of a variable is integerVariable handling
is_integer()Alias of is_int()Variable handling
is_iterable()Verify that the contents of a variable is an iterable valueVariable handling
is_link()Tells whether the filename is a symbolic linkFilesystem
is_long()Alias of is_int()Variable handling
is_nan()Checks whether a float is NANMath
is_null()Finds whether a variable is nullVariable handling
is_numeric()Finds whether a variable is a number or a numeric stringVariable handling
is_object()Finds whether a variable is an objectVariable handling
is_readable()Tells whether a file exists and is readableFilesystem
is_resource()Finds whether a variable is a resourceVariable handling
is_scalar()Finds whether a variable is a scalarVariable handling
is_string()Find whether the type of a variable is stringVariable handling
is_subclass_of()Checks if the object has this class as one of its parents or implements itClasses/Object
is_uploaded_file()Tells whether the file was uploaded via HTTP POSTFilesystem
is_writable()Tells whether the filename is writableFilesystem
is_writeable()Alias of is_writable()Filesystem
iterator_apply()Call a function for every element in an iteratorSPL
iterator_count()Count the elements in an iteratorSPL
iterator_to_array()Copy the iterator into an arraySPL

J

FunctionWhat it doesGroup
join()Alias of implode()String
json_decode()Decodes a JSON stringJSON
json_encode()Returns the JSON representation of a valueJSON
json_last_error()Returns the last error occurredJSON
json_last_error_msg()Returns the error string of the last json_validate(), json_encode() or json_decode() callJSON
json_validate()Checks if a string contains valid JSONJSON

K

FunctionWhat it doesGroup
key()Fetch a key from an arrayArray
key_exists()Alias of array_key_exists()Array
krsort()Sort an array by key in descending orderArray
ksort()Sort an array by key in ascending orderArray

L

FunctionWhat it doesGroup
lcfirst()Make a string's first character lowercaseString
lcg_value()Combined linear congruential generatorRandom
lchgrp()Changes group ownership of symlinkFilesystem
lchown()Changes user ownership of symlinkFilesystem
levenshtein()Calculate Levenshtein distance between two stringsString
libxml_clear_errors()Clear libxml error bufferlibxml
libxml_disable_entity_loader()Disable the ability to load external entitieslibxml
libxml_get_errors()Retrieve array of errorslibxml
libxml_get_external_entity_loader()Get the current external entity loaderlibxml
libxml_get_last_error()Retrieve last error from libxmllibxml
libxml_set_external_entity_loader()Changes the default external entity loaderlibxml
libxml_set_streams_context()Set the streams context for the next libxml document load or writelibxml
libxml_use_internal_errors()Disable libxml errors and allow user to fetch error information as neededlibxml
link()Create a hard linkFilesystem
linkinfo()Gets information about a linkFilesystem
localeconv()Get numeric formatting informationString
localtime()Get the local timeDate/Time
log()Natural logarithmMath
log10()Base-10 logarithmMath
log1p()Returns log(1 + number), computed in a way that is accurate even when the value of number is close to zeroMath
long2ip()Converts a long integer address into a string in (IPv4) Internet standard dotted formatNetwork
lstat()Gives information about a file or symbolic linkFilesystem
ltrim()Strip whitespace (or other characters) from the beginning of a stringString

M

FunctionWhat it doesGroup
mail()Send mailMail
max()Find highest valueMath
mb_check_encoding()Check if strings are valid for the specified encodingMultibyte String
mb_chr()Return character by Unicode code point valueMultibyte String
mb_convert_case()Perform case folding on a stringMultibyte String
mb_convert_encoding()Convert a string from one character encoding to anotherMultibyte String
mb_convert_kana()Convert "kana" one from another ("zen-kaku", "han-kaku" and more)Multibyte String
mb_convert_variables()Convert character code in variable(s)Multibyte String
mb_decode_mimeheader()Decode string in MIME header fieldMultibyte String
mb_decode_numericentity()Decode HTML numeric string reference to characterMultibyte String
mb_detect_encoding()Detect character encodingMultibyte String
mb_detect_order()Set/Get character encoding detection orderMultibyte String
mb_encode_mimeheader()Encode string for MIME headerMultibyte String
mb_encode_numericentity()Encode character to HTML numeric string referenceMultibyte String
mb_encoding_aliases()Get aliases of a known encoding typeMultibyte String
mb_ereg()Regular expression match with multibyte supportMultibyte String
mb_ereg_match()Regular expression match for multibyte stringMultibyte String
mb_ereg_replace()Replace regular expression with multibyte supportMultibyte String
mb_ereg_replace_callback()Perform a regular expression search and replace with multibyte support using a callbackMultibyte String
mb_ereg_search()Multibyte regular expression match for predefined multibyte stringMultibyte String
mb_ereg_search_getpos()Returns start point for next regular expression matchMultibyte String
mb_ereg_search_getregs()Retrieve the result from the last multibyte regular expression matchMultibyte String
mb_ereg_search_init()Setup string and regular expression for a multibyte regular expression matchMultibyte String
mb_ereg_search_pos()Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte stringMultibyte String
mb_ereg_search_regs()Returns the matched part of a multibyte regular expressionMultibyte String
mb_ereg_search_setpos()Set start point of next regular expression matchMultibyte String
mb_eregi()Regular expression match ignoring case with multibyte supportMultibyte String
mb_eregi_replace()Replace regular expression with multibyte support ignoring caseMultibyte String
mb_get_info()Get internal settings of mbstringMultibyte String
mb_http_input()Detect HTTP input character encodingMultibyte String
mb_http_output()Set/Get HTTP output character encodingMultibyte String
mb_internal_encoding()Set/Get internal character encodingMultibyte String
mb_language()Set/Get current languageMultibyte String
mb_lcfirst()Make a string's first character lowercaseMultibyte String
mb_list_encodings()Returns an array of all supported encodingsMultibyte String
mb_ltrim()Strip whitespace (or other characters) from the beginning of a stringMultibyte String
mb_ord()Get Unicode code point of characterMultibyte String
mb_output_handler()Callback function converts character encoding in output bufferMultibyte String
mb_parse_str()Parse GET/POST/COOKIE data and set global variableMultibyte String
mb_preferred_mime_name()Get MIME charset stringMultibyte String
mb_regex_encoding()Set/Get character encoding for multibyte regexMultibyte String
mb_regex_set_options()Set/Get the default options for mbregex functionsMultibyte String
mb_rtrim()Strip whitespace (or other characters) from the end of a stringMultibyte String
mb_scrub()Replace ill-formed byte sequences with the substitute characterMultibyte String
mb_send_mail()Send encoded mailMultibyte String
mb_split()Split multibyte string using regular expressionMultibyte String
mb_str_pad()Pad a multibyte string to a certain length with another multibyte stringMultibyte String
mb_str_split()Given a multibyte string, return an array of its charactersMultibyte String
mb_strcut()Get part of stringMultibyte String
mb_strimwidth()Get truncated string with specified widthMultibyte String
mb_stripos()Finds position of first occurrence of a string within another, case insensitiveMultibyte String
mb_stristr()Finds first occurrence of a string within another, case insensitiveMultibyte String
mb_strlen()Get string lengthMultibyte String
mb_strpos()Find position of first occurrence of string in a stringMultibyte String
mb_strrchr()Finds the last occurrence of a character in a string within anotherMultibyte String
mb_strrichr()Finds the last occurrence of a character in a string within another, case insensitiveMultibyte String
mb_strripos()Finds position of last occurrence of a string within another, case insensitiveMultibyte String
mb_strrpos()Find position of last occurrence of a string in a stringMultibyte String
mb_strstr()Finds first occurrence of a string within anotherMultibyte String
mb_strtolower()Make a string lowercaseMultibyte String
mb_strtoupper()Make a string uppercaseMultibyte String
mb_strwidth()Return width of stringMultibyte String
mb_substitute_character()Set/Get substitution characterMultibyte String
mb_substr()Get part of stringMultibyte String
mb_substr_count()Count the number of substring occurrencesMultibyte String
mb_trim()Strip whitespace (or other characters) from the beginning and end of a stringMultibyte String
mb_ucfirst()Make a string's first character uppercaseMultibyte String
md5()Calculate the md5 hash of a stringString
md5_file()Calculates the md5 hash of a given fileString
memory_get_peak_usage()Returns the peak of memory allocated by PHPPHP Options/Info
memory_get_usage()Returns the amount of memory allocated to the PHP script, or reserved from the system by PHP's memory managerPHP Options/Info
memory_reset_peak_usage()Reset the peak memory usagePHP Options/Info
metaphone()Calculate the metaphone key of a stringString
method_exists()Checks if the class method existsClasses/Object
mhash()Computes hashMhash
mhash_count()Gets the highest available hash IDMhash
mhash_get_block_size()Gets the block size of the specified hashMhash
mhash_get_hash_name()Gets the name of the specified hashMhash
mhash_keygen_s2k()Generates a keyMhash
microtime()Return current Unix timestamp with microsecondsDate/Time
min()Find lowest valueMath
mkdir()Makes directoryFilesystem
mktime()Get Unix timestamp for a dateDate/Time
move_uploaded_file()Moves an uploaded file to a new locationFilesystem
mt_getrandmax()Show largest possible random valueRandom
mt_rand()Generate a random value via the Mersenne Twister Random Number GeneratorRandom
mt_srand()Seeds the Mersenne Twister Random Number GeneratorRandom

N

FunctionWhat it doesGroup
natcasesort()Sort an array using a case insensitive "natural order" algorithmArray
natsort()Sort an array using a "natural order" algorithmArray
net_get_interfaces()Get network interfacesNetwork
next()Advance the internal pointer of an arrayArray
nl2br()Inserts HTML line breaks before all newlines in a stringString
nl_langinfo()Query language and locale informationString
number_format()Format a number with grouped thousandsString

O

FunctionWhat it doesGroup
ob_clean()Clean (erase) the contents of the active output bufferOutput Control
ob_end_clean()Clean (erase) the contents of the active output buffer and turn it offOutput Control
ob_end_flush()Flush (send) the return value of the active output handler and turn the active output buffer offOutput Control
ob_flush()Flush (send) the return value of the active output handlerOutput Control
ob_get_clean()Get the contents of the active output buffer and turn it offOutput Control
ob_get_contents()Return the contents of the output bufferOutput Control
ob_get_flush()Flush (send) the return value of the active output handler, return the contents of the active output buffer and turn it offOutput Control
ob_get_length()Return the length of the output bufferOutput Control
ob_get_level()Return the nesting level of the output buffering mechanismOutput Control
ob_get_status()Get status of output buffersOutput Control
ob_gzhandler()ob_start callback function to gzip output bufferZlib
ob_implicit_flush()Turn implicit flush on/offOutput Control
ob_list_handlers()List all output handlers in useOutput Control
ob_start()Turn on output bufferingOutput Control
octdec()Octal to decimalMath
opendir()Open directory handleDirectory
openlog()Open connection to system loggerNetwork
ord()Convert the first byte of a string to a value between 0 and 255String
output_add_rewrite_var()Add URL rewriter valuesOutput Control
output_reset_rewrite_vars()Reset URL rewriter valuesOutput Control

P

FunctionWhat it doesGroup
pack()Pack data into binary stringMisc.
parse_ini_file()Parse a configuration fileFilesystem
parse_ini_string()Parse a configuration stringFilesystem
parse_str()Parse a string as a URL query stringString
parse_url()Parse a URL and return its componentsURL
passthru()Execute an external program and display raw outputProgram execution
password_algos()Get available password hashing algorithm IDsPassword Hashing
password_get_info()Returns information about the given hashPassword Hashing
password_hash()Creates a password hashPassword Hashing
password_needs_rehash()Checks if the given hash matches the given optionsPassword Hashing
password_verify()Verifies that a password matches a hashPassword Hashing
pathinfo()Returns information about a file pathFilesystem
pclose()Closes process file pointerFilesystem
pfsockopen()Open persistent Internet or Unix domain socket connectionNetwork
php_ini_loaded_file()Retrieve a path to the loaded php.ini filePHP Options/Info
php_ini_scanned_files()Return a list of .ini files parsed from the additional ini dirPHP Options/Info
php_sapi_name()Returns the type of interface between web server and PHPPHP Options/Info
php_strip_whitespace()Return source with stripped comments and whitespaceMisc.
php_uname()Returns information about the operating system PHP is running onPHP Options/Info
phpcredits()Prints out the credits for PHPPHP Options/Info
phpinfo()Outputs information about PHP's configurationPHP Options/Info
phpversion()Gets the current PHP versionPHP Options/Info
pi()Get value of piMath
popen()Opens process file pointerFilesystem
pos()Alias of current()Array
pow()Exponential expressionMath
preg_filter()Perform a regular expression search and replacePCRE
preg_grep()Return array entries that match the patternPCRE
preg_last_error()Returns the error code of the last PCRE regex executionPCRE
preg_last_error_msg()Returns the error message of the last PCRE regex executionPCRE
preg_match()Perform a regular expression matchPCRE
preg_match_all()Perform a global regular expression matchPCRE
preg_quote()Quote regular expression charactersPCRE
preg_replace()Perform a regular expression search and replacePCRE
preg_replace_callback()Perform a regular expression search and replace using a callbackPCRE
preg_replace_callback_array()Perform a regular expression search and replace using callbacksPCRE
preg_split()Split string by a regular expressionPCRE
prev()Rewind the internal array pointerArray
print_r()Prints human-readable information about a variableVariable handling
printf()Output a formatted stringString
proc_close()Close pipes to a process opened by proc_open(), wait for it to terminate, and return its exit codeProgram execution
proc_get_status()Get information about a process opened by proc_open()Program execution
proc_nice()Change the priority of the current processProgram execution
proc_open()Execute a command and open file pointers for input/outputProgram execution
proc_terminate()Kills a process opened by proc_openProgram execution
property_exists()Checks if the object or class has a propertyClasses/Object
putenv()Sets the value of an environment variablePHP Options/Info

Q

FunctionWhat it doesGroup
quoted_printable_decode()Convert a quoted-printable string to an 8 bit stringString
quoted_printable_encode()Convert a 8 bit string to a quoted-printable stringString
quotemeta()Quote meta charactersString

R

FunctionWhat it doesGroup
rad2deg()Converts the radian number to the equivalent number in degreesMath
rand()Generate a random integerRandom
random_bytes()Get cryptographically secure random bytesRandom
random_int()Get a cryptographically secure, uniformly selected integerRandom
range()Create an array containing a range of elementsArray
rawurldecode()Decode URL-encoded stringsURL
rawurlencode()URL-encode according to RFC 3986URL
readdir()Read entry from directory handleDirectory
readfile()Outputs a fileFilesystem
readgzfile()Output a gz-fileZlib
readline()Reads a lineReadline
readline_add_history()Adds a line to the historyReadline
readline_callback_handler_install()Initializes the readline callback interface and terminal, prints the prompt and returns immediatelyReadline
readline_callback_handler_remove()Removes a previously installed callback handler and restores terminal settingsReadline
readline_callback_read_char()Reads a character and informs the readline callback interface when a line is receivedReadline
readline_clear_history()Clears the historyReadline
readline_completion_function()Registers a completion functionReadline
readline_info()Gets/sets various internal readline variablesReadline
readline_list_history()Lists the historyReadline
readline_on_new_line()Inform readline that the cursor has moved to a new lineReadline
readline_read_history()Reads the historyReadline
readline_redisplay()Redraws the displayReadline
readline_write_history()Writes the historyReadline
readlink()Returns the target of a symbolic linkFilesystem
realpath()Returns canonicalized absolute pathnameFilesystem
realpath_cache_get()Get realpath cache entriesFilesystem
realpath_cache_size()Get realpath cache sizeFilesystem
register_shutdown_function()Register a function for execution on shutdownFunction handling
register_tick_function()Register a function for execution on each tickFunction handling
rename()Renames a file or directoryFilesystem
request_parse_body()Read and parse the request body and return the resultNetwork
reset()Set the internal pointer of an array to its first elementArray
restore_error_handler()Restores the previous error handler functionError Handling
restore_exception_handler()Restores the previously defined exception handler functionError Handling
rewind()Rewind the position of a file pointerFilesystem
rewinddir()Rewind directory handleDirectory
rmdir()Removes directoryFilesystem
round()Rounds a floatMath
rsort()Sort an array in descending orderArray
rtrim()Strip whitespace (or other characters) from the end of a stringString

S

FunctionWhat it doesGroup
sapi_windows_cp_conv()Convert string from one codepage to anotherMisc.
sapi_windows_cp_get()Get current codepageMisc.
sapi_windows_cp_is_utf8()Indicates whether the codepage is UTF-8 compatibleMisc.
sapi_windows_cp_set()Set process codepageMisc.
sapi_windows_generate_ctrl_event()Send a CTRL event to another processMisc.
sapi_windows_set_ctrl_handler()Set or remove a CTRL event handlerMisc.
sapi_windows_vt100_support()Get or set VT100 support for the specified stream associated to an output buffer of a Windows console.Misc.
scandir()List files and directories inside the specified pathDirectory
serialize()Generates a storable representation of a valueVariable handling
session_abort()Discard session array changes and finish sessionSession
session_cache_expire()Get and/or set current cache expireSession
session_cache_limiter()Get and/or set the current cache limiterSession
session_commit()Alias of session_write_close()Session
session_create_id()Create new session idSession
session_decode()Decodes session data from a session encoded stringSession
session_destroy()Destroys all data registered to a sessionSession
session_encode()Encodes the current session data as a session encoded stringSession
session_gc()Perform session data garbage collectionSession
session_get_cookie_params()Get the session cookie parametersSession
session_id()Get and/or set the current session idSession
session_module_name()Get and/or set the current session moduleSession
session_name()Get and/or set the current session nameSession
session_regenerate_id()Update the current session id with a newly generated oneSession
session_register_shutdown()Session shutdown functionSession
session_reset()Re-initialize session array with original valuesSession
session_save_path()Get and/or set the current session save pathSession
session_set_cookie_params()Set the session cookie parametersSession
session_set_save_handler()Sets user-level session storage functionsSession
session_start()Start new or resume existing sessionSession
session_status()Returns the current session statusSession
session_unset()Free all session variablesSession
session_write_close()Write session data and end sessionSession
set_error_handler()Sets a user-defined error handler functionError Handling
set_exception_handler()Sets a user-defined exception handler functionError Handling
set_file_buffer()Alias of stream_set_write_buffer()Filesystem
set_include_path()Sets the include_path configuration optionPHP Options/Info
set_time_limit()Limits the maximum execution timePHP Options/Info
setcookie()Send a cookieNetwork
setlocale()Set locale informationString
setrawcookie()Send a cookie without urlencoding the cookie valueNetwork
settype()Set the type of a variableVariable handling
sha1()Calculate the sha1 hash of a stringString
sha1_file()Calculate the sha1 hash of a fileString
shell_exec()Execute command via shell and return the complete output as a stringProgram execution
show_source()Alias of highlight_file()Misc.
shuffle()Shuffle an arrayArray
similar_text()Calculate the similarity between two stringsString
simplexml_import_dom()Get a SimpleXMLElement object from an XML or HTML nodeSimpleXML
simplexml_load_file()Interprets an XML file into an objectSimpleXML
simplexml_load_string()Interprets a string of XML into an objectSimpleXML
sin()SineMath
sinh()Hyperbolic sineMath
sizeof()Alias of count()Array
sleep()Delay executionMisc.
socket_get_status()Alias of stream_get_meta_data()Network
socket_set_blocking()Alias of stream_set_blocking()Network
socket_set_timeout()Alias of stream_set_timeout()Network
sort()Sort an array in ascending orderArray
soundex()Calculate the soundex key of a stringString
spl_autoload()Default implementation for __autoload()SPL
spl_autoload_call()Try all registered __autoload() functions to load the requested classSPL
spl_autoload_extensions()Register and return default file extensions for spl_autoloadSPL
spl_autoload_functions()Return all registered __autoload() functionsSPL
spl_autoload_register()Register given function as __autoload() implementationSPL
spl_autoload_unregister()Unregister given function as __autoload() implementationSPL
spl_classes()Return available SPL classesSPL
spl_object_hash()Return hash id for given objectSPL
spl_object_id()Return the integer object handle for given objectSPL
sprintf()Return a formatted stringString
sqrt()Square rootMath
srand()Seed the random number generatorRandom
sscanf()Parses input from a string according to a formatString
stat()Gives information about a fileFilesystem
str_contains()Determine if a string contains a given substringString
str_decrement()Decrement an alphanumeric stringString
str_ends_with()Checks if a string ends with a given substringString
str_getcsv()Parse a CSV string into an arrayString
str_increment()Increment an alphanumeric stringString
str_ireplace()Case-insensitive version of str_replace()String
str_pad()Pad a string to a certain length with another stringString
str_repeat()Repeat a stringString
str_replace()Replace all occurrences of the search string with the replacement stringString
str_rot13()Perform the rot13 transform on a stringString
str_shuffle()Randomly shuffles a stringString
str_split()Convert a string to an arrayString
str_starts_with()Checks if a string starts with a given substringString
str_word_count()Return information about words used in a stringString
strcasecmp()Binary safe case-insensitive string comparisonString
strchr()Alias of strstr()String
strcmp()Binary safe string comparisonString
strcoll()Locale based string comparisonString
strcspn()Find length of initial segment not matching maskString
stream_bucket_append()Append bucket to brigadeStream
stream_bucket_make_writeable()Returns a bucket object from the brigade to operate onStream
stream_bucket_new()Create a new bucket for use on the current streamStream
stream_bucket_prepend()Prepend bucket to brigadeStream
stream_context_create()Creates a stream contextStream
stream_context_get_default()Retrieve the default stream contextStream
stream_context_get_options()Retrieve options for a stream/wrapper/contextStream
stream_context_get_params()Retrieves parameters from a contextStream
stream_context_set_default()Set the default stream contextStream
stream_context_set_option()Sets an option for a stream/wrapper/contextStream
stream_context_set_options()Sets options on the specified contextStream
stream_context_set_params()Set parameters for a stream/wrapper/contextStream
stream_copy_to_stream()Copies data from one stream to anotherStream
stream_filter_append()Attach a filter to a streamStream
stream_filter_prepend()Attach a filter to a streamStream
stream_filter_register()Register a user defined stream filterStream
stream_filter_remove()Remove a filter from a streamStream
stream_get_contents()Reads remainder of a stream into a stringStream
stream_get_filters()Retrieve list of registered filtersStream
stream_get_line()Gets line from stream resource up to a given delimiterStream
stream_get_meta_data()Retrieves header/meta data from streams/file pointersStream
stream_get_transports()Retrieve list of registered socket transportsStream
stream_get_wrappers()Retrieve list of registered streamsStream
stream_is_local()Checks if a stream is a local streamStream
stream_isatty()Check if a stream is a TTYStream
stream_register_wrapper()Alias of stream_wrapper_register()Stream
stream_resolve_include_path()Resolve filename against the include pathStream
stream_select()Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by seconds and microsecondsStream
stream_set_blocking()Set blocking/non-blocking mode on a streamStream
stream_set_chunk_size()Set the stream chunk sizeStream
stream_set_read_buffer()Set read file buffering on the given streamStream
stream_set_timeout()Set timeout period on a streamStream
stream_set_write_buffer()Sets write file buffering on the given streamStream
stream_socket_accept()Accept a connection on a socket created by stream_socket_server()Stream
stream_socket_client()Open Internet or Unix domain socket connectionStream
stream_socket_enable_crypto()Turns encryption on/off on an already connected socketStream
stream_socket_get_name()Retrieve the name of the local or remote socketsStream
stream_socket_pair()Creates a pair of connected, indistinguishable socket streamsStream
stream_socket_recvfrom()Receives data from a socket, connected or notStream
stream_socket_sendto()Sends a message to a socket, whether it is connected or notStream
stream_socket_server()Create an Internet or Unix domain server socketStream
stream_socket_shutdown()Shutdown a full-duplex connectionStream
stream_supports_lock()Tells whether the stream supports lockingStream
stream_wrapper_register()Register a URL wrapper implemented as a PHP classStream
stream_wrapper_restore()Restores a previously unregistered built-in wrapperStream
stream_wrapper_unregister()Unregister a URL wrapperStream
strftime()Format a local time/date according to locale settingsDate/Time
strip_tags()Strip HTML and PHP tags from a stringString
stripcslashes()Un-quote string quoted with addcslashes()String
stripos()Find the position of the first occurrence of a case-insensitive substring in a stringString
stripslashes()Un-quotes a quoted stringString
stristr()Case-insensitive strstr()String
strlen()Get string lengthString
strnatcasecmp()Case insensitive string comparisons using a "natural order" algorithmString
strnatcmp()String comparisons using a "natural order" algorithmString
strncasecmp()Binary safe case-insensitive string comparison of the first n charactersString
strncmp()Binary safe string comparison of the first n charactersString
strpbrk()Search a string for any of a set of charactersString
strpos()Find the position of the first occurrence of a substring in a stringString
strptime()Parse a time/date generated with strftime()Date/Time
strrchr()Find the last occurrence of a character in a stringString
strrev()Reverse a stringString
strripos()Find the position of the last occurrence of a case-insensitive substring in a stringString
strrpos()Find the position of the last occurrence of a substring in a stringString
strspn()Finds the length of the initial segment of a string consisting entirely of characters contained within a given maskString
strstr()Find the first occurrence of a stringString
strtok()Tokenize stringString
strtolower()Make a string lowercaseString
strtotime()Parse about any English textual datetime description into a Unix timestampDate/Time
strtoupper()Make a string uppercaseString
strtr()Translate characters or replace substringsString
strval()Get string value of a variableVariable handling
substr()Return part of a stringString
substr_compare()Binary safe comparison of two strings from an offset, up to length charactersString
substr_count()Count the number of substring occurrencesString
substr_replace()Replace text within a portion of a stringString
symlink()Creates a symbolic linkFilesystem
sys_get_temp_dir()Returns directory path used for temporary filesPHP Options/Info
sys_getloadavg()Gets system load averageMisc.
syslog()Generate a system log messageNetwork
system()Execute an external program and display the outputProgram execution

T

FunctionWhat it doesGroup
tan()TangentMath
tanh()Hyperbolic tangentMath
tempnam()Create file with unique file nameFilesystem
time()Return current Unix timestampDate/Time
time_nanosleep()Delay for a number of seconds and nanosecondsMisc.
time_sleep_until()Make the script sleep until the specified timeMisc.
timezone_abbreviations_list()Alias of DateTimeZone::listAbbreviations()Date/Time
timezone_identifiers_list()Alias of DateTimeZone::listIdentifiers()Date/Time
timezone_location_get()Alias of DateTimeZone::getLocation()Date/Time
timezone_name_from_abbr()Returns a timezone name by guessing from abbreviation and UTC offsetDate/Time
timezone_name_get()Alias of DateTimeZone::getName()Date/Time
timezone_offset_get()Alias of DateTimeZone::getOffset()Date/Time
timezone_open()Alias of DateTimeZone::__construct()Date/Time
timezone_transitions_get()Alias of DateTimeZone::getTransitions()Date/Time
timezone_version_get()Gets the version of the timezonedbDate/Time
tmpfile()Creates a temporary fileFilesystem
token_get_all()Split given source into PHP tokensTokenizer
token_name()Get the symbolic name of a given PHP tokenTokenizer
touch()Sets access and modification time of fileFilesystem
trait_exists()Checks if the trait existsClasses/Object
trigger_error()Generates a user-level error/warning/notice messageError Handling
trim()Strip whitespace (or other characters) from the beginning and end of a stringString

U

FunctionWhat it doesGroup
uasort()Sort an array with a user-defined comparison function and maintain index associationArray
ucfirst()Make a string's first character uppercaseString
ucwords()Uppercase the first character of each word in a stringString
uksort()Sort an array by keys using a user-defined comparison functionArray
umask()Changes the current umaskFilesystem
uniqid()Generate a time-based identifierMisc.
unlink()Deletes a fileFilesystem
unpack()Unpack data from binary stringMisc.
unregister_tick_function()De-register a function for execution on each tickFunction handling
unserialize()Creates a PHP value from a stored representationVariable handling
urldecode()Decodes URL-encoded stringURL
urlencode()URL-encodes stringURL
user_error()Alias of trigger_error()Error Handling
usleep()Delay execution in microsecondsMisc.
usort()Sort an array by values using a user-defined comparison functionArray
utf8_decode()Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable charactersString
utf8_encode()Converts a string from ISO-8859-1 to UTF-8String

V

FunctionWhat it doesGroup
var_dump()Dumps information about a variableVariable handling
var_export()Outputs or returns a parsable string representation of a variableVariable handling
version_compare()Compares two "PHP-standardized" version number stringsPHP Options/Info
vfprintf()Write a formatted string to a streamString
vprintf()Output a formatted stringString
vsprintf()Return a formatted stringString

W

FunctionWhat it doesGroup
wordwrap()Wraps a string to a given number of charactersString

X

FunctionWhat it doesGroup
xml_error_string()Get XML parser error stringXML Parser
xml_get_current_byte_index()Get current byte index for an XML parserXML Parser
xml_get_current_column_number()Get current column number for an XML parserXML Parser
xml_get_current_line_number()Get current line number for an XML parserXML Parser
xml_get_error_code()Get XML parser error codeXML Parser
xml_parse()Start parsing an XML documentXML Parser
xml_parse_into_struct()Parse XML data into an array structureXML Parser
xml_parser_create()Create an XML parserXML Parser
xml_parser_create_ns()Create an XML parser with namespace supportXML Parser
xml_parser_free()Free an XML parserXML Parser
xml_parser_get_option()Get options from an XML parserXML Parser
xml_parser_set_option()Set options in an XML parserXML Parser
xml_set_character_data_handler()Set up character data handlerXML Parser
xml_set_default_handler()Set up default handlerXML Parser
xml_set_element_handler()Set up start and end element handlersXML Parser
xml_set_end_namespace_decl_handler()Set up end namespace declaration handlerXML Parser
xml_set_external_entity_ref_handler()Set up external entity reference handlerXML Parser
xml_set_notation_decl_handler()Set up notation declaration handlerXML Parser
xml_set_object()Use XML Parser within an objectXML Parser
xml_set_processing_instruction_handler()Set up processing instruction (PI) handlerXML Parser
xml_set_start_namespace_decl_handler()Set up start namespace declaration handlerXML Parser
xml_set_unparsed_entity_decl_handler()Set up unparsed entity declaration handlerXML Parser

Z

FunctionWhat it doesGroup
zend_thread_id()Returns a unique identifier for the current threadPHP Options/Info
zend_version()Gets the version of the current Zend enginePHP Options/Info
zlib_decode()Uncompress any raw/gzip/zlib encoded dataZlib
zlib_encode()Compress data with the specified encodingZlib
zlib_get_coding_type()Returns the coding type used for output compressionZlib

Source: the PHP manual, Function Reference (CC BY 3.0). Pages were generated from the manual text; corrections go to info@aredel.com.