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.
| Group | Functions |
|---|---|
| String Functions | 100 |
| Array Functions | 85 |
| Filesystem Functions | 81 |
| Multibyte String Functions | 65 |
| Date/Time Functions | 51 |
| PHP Options/Info Functions | 50 |
| Stream Functions | 46 |
| Math Functions | 44 |
| Network Functions | 37 |
| Variable handling Functions | 33 |
| Zlib Functions | 30 |
| Misc. Functions | 29 |
| Session Functions | 23 |
| XML Parser Functions | 22 |
| Classes/Object Functions | 19 |
| Output Control Functions | 16 |
| Hash Functions | 15 |
| SPL Functions | 15 |
| Error Handling Functions | 14 |
| Readline Functions | 13 |
| Function handling Functions | 12 |
| Ctype Functions | 11 |
| PCRE Functions | 11 |
| Program execution Functions | 11 |
| URL Functions | 10 |
| iconv Functions | 10 |
| Directory Functions | 9 |
| Random Functions | 9 |
| libxml Functions | 8 |
| Filter Functions | 7 |
| GD and Image Functions | 6 |
| JSON Functions | 5 |
| Mhash Functions | 5 |
| Password Hashing Functions | 5 |
| SimpleXML Functions | 3 |
| Tokenizer Functions | 2 |
| DOM Functions | 1 |
| Mail Functions | 1 |
| Semaphore Functions | 1 |
A
| Function | What it does | Group |
|---|---|---|
| abs() | Absolute value | Math |
| acos() | Arc cosine | Math |
| acosh() | Inverse hyperbolic cosine | Math |
| addcslashes() | Quote string with slashes in a C style | String |
| addslashes() | Quote string with slashes | String |
| array_all() | Checks if all array elements satisfy a callback function | Array |
| array_any() | Checks if at least one array element satisfies a callback function | Array |
| array_change_key_case() | Changes the case of all keys in an array | Array |
| array_chunk() | Split an array into chunks | Array |
| array_column() | Return the values from a single column in the input array | Array |
| array_combine() | Creates an array by using one array for keys and another for its values | Array |
| array_count_values() | Counts the occurrences of each distinct value in an array | Array |
| array_diff() | Computes the difference of arrays | Array |
| array_diff_assoc() | Computes the difference of arrays with additional index check | Array |
| array_diff_key() | Computes the difference of arrays using keys for comparison | Array |
| array_diff_uassoc() | Computes the difference of arrays with additional index check which is performed by a user supplied callback function | Array |
| array_diff_ukey() | Computes the difference of arrays using a callback function on the keys for comparison | Array |
| array_fill() | Fill an array with values | Array |
| array_fill_keys() | Fill an array with values, specifying keys | Array |
| array_filter() | Filters elements of an array using a callback function | Array |
| array_find() | Returns the first element satisfying a callback function | Array |
| array_find_key() | Returns the key of the first element satisfying a callback function | Array |
| array_first() | Gets the first value of an array | Array |
| array_flip() | Exchanges all keys with their associated values in an array | Array |
| array_intersect() | Computes the intersection of arrays | Array |
| array_intersect_assoc() | Computes the intersection of arrays with additional index check | Array |
| array_intersect_key() | Computes the intersection of arrays using keys for comparison | Array |
| array_intersect_uassoc() | Computes the intersection of arrays with additional index check, compares indexes by a callback function | Array |
| array_intersect_ukey() | Computes the intersection of arrays using a callback function on the keys for comparison | Array |
| array_is_list() | Checks whether a given array is a list | Array |
| array_key_exists() | Checks if the given key or index exists in the array | Array |
| array_key_first() | Gets the first key of an array | Array |
| array_key_last() | Gets the last key of an array | Array |
| array_keys() | Return all the keys or a subset of the keys of an array | Array |
| array_last() | Gets the last value of an array | Array |
| array_map() | Applies the callback to the elements of the given arrays | Array |
| array_merge() | Merge one or more arrays | Array |
| array_merge_recursive() | Merge one or more arrays recursively | Array |
| array_multisort() | Sort multiple or multi-dimensional arrays | Array |
| array_pad() | Pad array to the specified length with a value | Array |
| array_pop() | Pop the element off the end of array | Array |
| array_product() | Calculate the product of values in an array | Array |
| array_push() | Push one or more elements onto the end of array | Array |
| array_rand() | Pick one or more random keys out of an array | Array |
| array_reduce() | Iteratively reduce the array to a single value using a callback function | Array |
| array_replace() | Replaces elements from passed arrays into the first array | Array |
| array_replace_recursive() | Replaces elements from passed arrays into the first array recursively | Array |
| array_reverse() | Return an array with elements in reverse order | Array |
| array_search() | Searches the array for a given value and returns the first corresponding key if successful | Array |
| array_shift() | Shift an element off the beginning of array | Array |
| array_slice() | Extract a slice of the array | Array |
| array_splice() | Remove a portion of the array and replace it with something else | Array |
| array_sum() | Calculate the sum of values in an array | Array |
| array_udiff() | Computes the difference of arrays by using a callback function for data comparison | Array |
| array_udiff_assoc() | Computes the difference of arrays with additional index check, compares data by a callback function | Array |
| array_udiff_uassoc() | Computes the difference of arrays with additional index check, compares data and indexes by a callback function | Array |
| array_uintersect() | Computes the intersection of arrays, compares data by a callback function | Array |
| array_uintersect_assoc() | Computes the intersection of arrays with additional index check, compares data by a callback function | Array |
| array_uintersect_uassoc() | Computes the intersection of arrays with additional index check, compares data and indexes by separate callback functions | Array |
| array_unique() | Removes duplicate values from an array | Array |
| array_unshift() | Prepend one or more elements to the beginning of an array | Array |
| array_values() | Return all the values of an array | Array |
| array_walk() | Apply a user supplied function to every member of an array | Array |
| array_walk_recursive() | Apply a user function recursively to every member of an array | Array |
| arsort() | Sort an array in descending order and maintain index association | Array |
| asin() | Arc sine | Math |
| asinh() | Inverse hyperbolic sine | Math |
| asort() | Sort an array in ascending order and maintain index association | Array |
| assert() | Checks an assertion | PHP Options/Info |
| assert_options() | Set/get the various assert flags | PHP Options/Info |
| atan() | Arc tangent | Math |
| atan2() | Arc tangent of two variables | Math |
| atanh() | Inverse hyperbolic tangent | Math |
B
| Function | What it does | Group |
|---|---|---|
| base64_decode() | Decodes data encoded with MIME base64 | URL |
| base64_encode() | Encodes data with MIME base64 | URL |
| base_convert() | Convert a number between arbitrary bases | Math |
| basename() | Returns trailing name component of path | Filesystem |
| bin2hex() | Convert binary data into hexadecimal representation | String |
| bindec() | Binary to decimal | Math |
| boolval() | Get the boolean value of a variable | Variable handling |
C
| Function | What it does | Group |
|---|---|---|
| call_user_func() | Call the callback given by the first parameter | Function handling |
| call_user_func_array() | Call a callback with an array of parameters | Function handling |
| ceil() | Round fractions up | Math |
| chdir() | Change directory | Directory |
| checkdate() | Validate a Gregorian date | Date/Time |
| checkdnsrr() | Check DNS records corresponding to a given Internet host name or IP address | Network |
| chgrp() | Changes file group | Filesystem |
| chmod() | Changes file mode | Filesystem |
| chop() | Alias of rtrim() | String |
| chown() | Changes file owner | Filesystem |
| chr() | Generate a single-byte string from a number | String |
| chroot() | Change the root directory | Directory |
| chunk_split() | Split a string into smaller chunks | String |
| class_alias() | Creates an alias for a class | Classes/Object |
| class_exists() | Checks if the class has been defined | Classes/Object |
| class_implements() | Return the interfaces which are implemented by the given class or interface | SPL |
| class_parents() | Return the parent classes of the given class | SPL |
| class_uses() | Return the traits used by the given class | SPL |
| clearstatcache() | Clears file status cache | Filesystem |
| closedir() | Close directory handle | Directory |
| closelog() | Close connection to system logger | Network |
| compact() | Create array containing variables and their values | Array |
| connection_aborted() | Check whether client disconnected | Misc. |
| connection_status() | Returns connection status bitfield | Misc. |
| constant() | Returns the value of a constant | Misc. |
| convert_uudecode() | Decode a uuencoded string | String |
| convert_uuencode() | Uuencode a string | String |
| copy() | Copies file | Filesystem |
| cos() | Cosine | Math |
| cosh() | Hyperbolic cosine | Math |
| count() | Counts all elements in an array or in a Countable object | Array |
| count_chars() | Return information about characters used in a string | String |
| crc32() | Calculates the crc32 polynomial of a string | String |
| crypt() | One-way string hashing | String |
| 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 space | Ctype |
| 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 character | Ctype |
| 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 digit | Ctype |
| current() | Return the current element in an array | Array |
D
| Function | What it does | Group |
|---|---|---|
| date() | Format a Unix timestamp | Date/Time |
| date_add() | Alias of DateTime::add() | Date/Time |
| date_create() | create a new DateTime object | Date/Time |
| date_create_from_format() | Alias of DateTime::createFromFormat() | Date/Time |
| date_create_immutable() | create a new DateTimeImmutable object | Date/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 script | Date/Time |
| date_default_timezone_set() | Sets the default timezone used by all date/time functions in a script | Date/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/time | Date/Time |
| date_parse_from_format() | Get info about given date formatted according to the specified format | Date/Time |
| date_sub() | Alias of DateTime::sub() | Date/Time |
| date_sun_info() | Returns an array with information about sunset/sunrise and twilight begin/end | Date/Time |
| date_sunrise() | Returns time of sunrise for a given day and location | Date/Time |
| date_sunset() | Returns time of sunset for a given day and location | Date/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 backtrace | Error Handling |
| debug_print_backtrace() | Prints a backtrace | Error Handling |
| debug_zval_dump() | Dumps a string representation of an internal zval structure to output | Variable handling |
| decbin() | Decimal to binary | Math |
| dechex() | Decimal to hexadecimal | Math |
| decoct() | Decimal to octal | Math |
| define() | Defines a named constant | Misc. |
| defined() | Checks whether a constant with the given name exists | Misc. |
| deflate_add() | Incrementally deflate data | Zlib |
| deflate_init() | Initialize an incremental deflate context | Zlib |
| deg2rad() | Converts the number in degrees to the radian equivalent | Math |
| die() | Alias of exit() | Misc. |
| dir() | Return an instance of the Directory class | Directory |
| dirname() | Returns a parent directory's path | Filesystem |
| disk_free_space() | Returns available space on filesystem or disk partition | Filesystem |
| disk_total_space() | Returns the total size of a filesystem or disk partition | Filesystem |
| diskfreespace() | Alias of disk_free_space() | Filesystem |
| dl() | Loads a PHP extension at runtime | PHP 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 hostname | Network |
| dom_import_simplexml() | Gets a DOMAttr or DOMElement object from a SimpleXMLElement object | DOM |
| doubleval() | Alias of floatval() | Variable handling |
E
| Function | What it does | Group |
|---|---|---|
| end() | Set the internal pointer of an array to its last element | Array |
| enum_exists() | Checks if the enum has been defined | Classes/Object |
| error_clear_last() | Clear the most recent error | Error Handling |
| error_get_last() | Get the last occurred error | Error Handling |
| error_log() | Send an error message to the defined error handling routines | Error Handling |
| error_reporting() | Sets which PHP errors are reported | Error Handling |
| escapeshellarg() | Escape a string to be used as a shell argument | Program execution |
| escapeshellcmd() | Escape shell metacharacters | Program execution |
| exec() | Execute an external program | Program execution |
| exit() | Terminate the current script with a status code or message | Misc. |
| exp() | Calculates the exponent of e | Math |
| explode() | Split a string by a string | String |
| expm1() | Returns exp($num) - 1, computed in a way that is accurate even when the value of number is close to zero | Math |
| extension_loaded() | Find out whether an extension is loaded | PHP Options/Info |
| extract() | Import variables into the current symbol table from an array | Array |
F
| Function | What it does | Group |
|---|---|---|
| fclose() | Closes an open file pointer | Filesystem |
| fdatasync() | Synchronizes data (but not meta-data) to the file | Filesystem |
| fdiv() | Divides two numbers, according to IEEE 754 | Math |
| feof() | Tests for end-of-file on a file pointer | Filesystem |
| fflush() | Flushes the output to a file | Filesystem |
| fgetc() | Gets character from file pointer | Filesystem |
| fgetcsv() | Gets line from file pointer and parse for CSV fields | Filesystem |
| fgets() | Gets line from file pointer | Filesystem |
| file() | Reads entire file into an array | Filesystem |
| file_exists() | Checks whether a file or directory exists | Filesystem |
| file_get_contents() | Reads entire file into a string | Filesystem |
| file_put_contents() | Write data to a file | Filesystem |
| fileatime() | Gets last access time of file | Filesystem |
| filectime() | Gets inode change time of file | Filesystem |
| filegroup() | Gets file group | Filesystem |
| fileinode() | Gets file inode | Filesystem |
| filemtime() | Gets file modification time | Filesystem |
| fileowner() | Gets file owner | Filesystem |
| fileperms() | Gets file permissions | Filesystem |
| filesize() | Gets file size | Filesystem |
| filetype() | Gets file type | Filesystem |
| filter_has_var() | Checks if a variable of the specified type exists | Filter |
| filter_id() | Returns the filter ID belonging to a named filter | Filter |
| filter_input() | Gets a specific external variable by name and optionally filters it | Filter |
| filter_input_array() | Gets external variables and optionally filters them | Filter |
| filter_list() | Returns a list of all supported filters | Filter |
| filter_var() | Filters a variable with a specified filter | Filter |
| filter_var_array() | Gets multiple variables and optionally filters them | Filter |
| floatval() | Get float value of a variable | Variable handling |
| flock() | Portable advisory file locking | Filesystem |
| floor() | Round fractions down | Math |
| flush() | Flush system output buffer | Output Control |
| fmod() | Returns the floating point remainder (modulo) of the division of the arguments | Math |
| fnmatch() | Match filename against a pattern | Filesystem |
| fopen() | Opens file or URL | Filesystem |
| forward_static_call() | Call a callback while preserving the current called class | Function handling |
| forward_static_call_array() | Call a callback with an array of parameters, preserving the current called class | Function handling |
| fpassthru() | Output all remaining data on a file pointer | Filesystem |
| fpow() | Raise one number to the power of another, according to IEEE 754 | Math |
| fprintf() | Write a formatted string to a stream | String |
| fputcsv() | Format line as CSV and write to file pointer | Filesystem |
| fputs() | Alias of fwrite() | Filesystem |
| fread() | Binary-safe file read | Filesystem |
| fscanf() | Parses input from a file according to a format | Filesystem |
| fseek() | Seeks on a file pointer | Filesystem |
| fsockopen() | Open Internet or Unix domain socket connection | Network |
| fstat() | Gets information about a file using an open file pointer | Filesystem |
| fsync() | Synchronizes changes to the file (including meta-data) | Filesystem |
| ftell() | Returns the current position of the file read/write pointer | Filesystem |
| ftok() | Convert a pathname and a project identifier to a System V IPC key | Semaphore |
| ftruncate() | Truncates a file to a given length | Filesystem |
| func_get_arg() | Return an item from the argument list | Function handling |
| func_get_args() | Returns an array comprising a function's argument list | Function handling |
| func_num_args() | Returns the number of arguments passed to the function | Function handling |
| function_exists() | Return true if the given function has been defined | Function handling |
| fwrite() | Binary-safe file write | Filesystem |
G
| Function | What it does | Group |
|---|---|---|
| gc_collect_cycles() | Forces collection of any existing garbage cycles | PHP Options/Info |
| gc_disable() | Deactivates the circular reference collector | PHP Options/Info |
| gc_enable() | Activates the circular reference collector | PHP Options/Info |
| gc_enabled() | Returns status of the circular reference collector | PHP Options/Info |
| gc_mem_caches() | Reclaims memory used by the Zend Engine memory manager | PHP Options/Info |
| gc_status() | Gets information about the garbage collector | PHP Options/Info |
| get_browser() | Tells what the user's browser is capable of | Misc. |
| get_called_class() | The "Late Static Binding" class name | Classes/Object |
| get_cfg_var() | Gets the value of a PHP configuration option | PHP Options/Info |
| get_class() | Returns the name of the class of an object | Classes/Object |
| get_class_methods() | Gets the class methods' names | Classes/Object |
| get_class_vars() | Get the default properties of the class | Classes/Object |
| get_current_user() | Gets the name of the owner of the current PHP script | PHP Options/Info |
| get_debug_type() | Gets the type name of a variable in a way that is suitable for debugging | Variable handling |
| get_declared_classes() | Returns an array with the name of the defined classes | Classes/Object |
| get_declared_interfaces() | Returns an array of all declared interfaces | Classes/Object |
| get_declared_traits() | Returns an array of all declared traits | Classes/Object |
| get_defined_constants() | Returns an associative array with the names of all the constants and their values | PHP Options/Info |
| get_defined_functions() | Returns an array of all defined functions | Function handling |
| get_defined_vars() | Returns an array of all defined variables | Variable handling |
| get_error_handler() | Gets the user-defined error handler function | Error Handling |
| get_exception_handler() | Gets the user-defined exception handler function | Error Handling |
| get_extension_funcs() | Returns an array with the names of the functions of a module | PHP Options/Info |
| get_headers() | Fetches all the headers sent by the server in response to an HTTP request | URL |
| get_html_translation_table() | Returns the translation table used by htmlspecialchars() and htmlentities() | String |
| get_include_path() | Gets the current include_path configuration option | PHP Options/Info |
| get_included_files() | Returns an array with the names of included or required files | PHP Options/Info |
| get_loaded_extensions() | Returns an array with the names of all modules compiled and loaded | PHP Options/Info |
| get_mangled_object_vars() | Returns an array of mangled object properties | Classes/Object |
| get_meta_tags() | Extracts all meta tag content attributes from a file and returns an array | URL |
| get_object_vars() | Gets the properties of the given object | Classes/Object |
| get_parent_class() | Retrieves the parent class name for object or class | Classes/Object |
| get_required_files() | Alias of get_included_files() | PHP Options/Info |
| get_resource_id() | Returns an integer identifier for the given resource | Variable handling |
| get_resource_type() | Returns the resource type | Variable handling |
| get_resources() | Returns active resources | PHP Options/Info |
| getcwd() | Gets the current working directory | Directory |
| getdate() | Get date/time information | Date/Time |
| getenv() | Gets the value of a single or all environment variables | PHP Options/Info |
| gethostbyaddr() | Get the Internet host name corresponding to a given IP address | Network |
| gethostbyname() | Get the IPv4 address corresponding to a given Internet host name | Network |
| gethostbynamel() | Get a list of IPv4 addresses corresponding to a given Internet host name | Network |
| gethostname() | Gets the host name | Network |
| getimagesize() | Get the size of an image | GD and Image |
| getimagesizefromstring() | Get the size of an image from a string | GD and Image |
| getlastmod() | Gets time of last page modification | PHP Options/Info |
| getmxrr() | Get MX records corresponding to a given Internet host name | Network |
| getmygid() | Get PHP script owner's GID | PHP Options/Info |
| getmyinode() | Gets the inode of the current script | PHP Options/Info |
| getmypid() | Gets PHP's process ID | PHP Options/Info |
| getmyuid() | Gets PHP script owner's UID | PHP Options/Info |
| getopt() | Gets options from the command line argument list | PHP Options/Info |
| getprotobyname() | Get protocol number associated with protocol name | Network |
| getprotobynumber() | Get protocol name associated with protocol number | Network |
| getrandmax() | Show largest possible random value | Random |
| getrusage() | Gets the current resource usages | PHP Options/Info |
| getservbyname() | Get port number associated with an Internet service and protocol | Network |
| getservbyport() | Get Internet service which corresponds to port and protocol | Network |
| gettimeofday() | Get current time | Date/Time |
| gettype() | Get the type of a variable | Variable handling |
| glob() | Find pathnames matching a pattern | Filesystem |
| gmdate() | Format a GMT/UTC date/time | Date/Time |
| gmmktime() | Get Unix timestamp for a GMT date | Date/Time |
| gmstrftime() | Format a GMT/UTC time/date according to locale settings | Date/Time |
| gzclose() | Close an open gz-file pointer | Zlib |
| gzcompress() | Compress a string | Zlib |
| gzdecode() | Decodes a gzip compressed string | Zlib |
| gzdeflate() | Deflate a string | Zlib |
| gzencode() | Create a gzip compressed string | Zlib |
| gzeof() | Test for EOF on a gz-file pointer | Zlib |
| gzfile() | Read entire gz-file into an array | Zlib |
| gzgetc() | Get character from gz-file pointer | Zlib |
| gzgets() | Get line from file pointer | Zlib |
| gzinflate() | Inflate a deflated string | Zlib |
| gzopen() | Open gz-file | Zlib |
| gzpassthru() | Output all remaining data on a gz-file pointer | Zlib |
| gzputs() | Alias of gzwrite() | Zlib |
| gzread() | Binary-safe gz-file read | Zlib |
| gzrewind() | Rewind the position of a gz-file pointer | Zlib |
| gzseek() | Seek on a gz-file pointer | Zlib |
| gztell() | Tell gz-file pointer read/write position | Zlib |
| gzuncompress() | Uncompress a compressed string | Zlib |
| gzwrite() | Binary-safe gz-file write | Zlib |
H
| Function | What it does | Group |
|---|---|---|
| hash() | Generate a hash value (message digest) | Hash |
| hash_algos() | Return a list of registered hashing algorithms | Hash |
| hash_copy() | Copy hashing context | Hash |
| hash_equals() | Timing attack safe string comparison | Hash |
| hash_file() | Generate a hash value using the contents of a given file | Hash |
| hash_final() | Finalize an incremental hash and return resulting digest | Hash |
| hash_hkdf() | Generate a HKDF key derivation of a supplied key input | Hash |
| hash_hmac() | Generate a keyed hash value using the HMAC method | Hash |
| hash_hmac_algos() | Return a list of registered hashing algorithms suitable for hash_hmac | Hash |
| hash_hmac_file() | Generate a keyed hash value using the HMAC method and the contents of a given file | Hash |
| hash_init() | Initialize an incremental hashing context | Hash |
| hash_pbkdf2() | Generate a PBKDF2 key derivation of a supplied password | Hash |
| hash_update() | Pump data into an active hashing context | Hash |
| hash_update_file() | Pump data into an active hashing context from a file | Hash |
| hash_update_stream() | Pump data into an active hashing context from an open stream | Hash |
| header() | Send a raw HTTP header | Network |
| header_register_callback() | Call a header function | Network |
| header_remove() | Remove previously set headers | Network |
| headers_list() | Returns a list of response headers sent (or ready to send) | Network |
| headers_sent() | Checks if or where headers have been sent | Network |
| hebrev() | Convert logical Hebrew text to visual text | String |
| hex2bin() | Decodes a hexadecimally encoded binary string | String |
| hexdec() | Hexadecimal to decimal | Math |
| highlight_file() | Syntax highlighting of a file | Misc. |
| highlight_string() | Syntax highlighting of a string | Misc. |
| hrtime() | Get the system's high resolution time | Misc. |
| html_entity_decode() | Convert HTML entities to their corresponding characters | String |
| htmlentities() | Convert all applicable characters to HTML entities | String |
| htmlspecialchars() | Convert special characters to HTML entities | String |
| htmlspecialchars_decode() | Convert special HTML entities back to characters | String |
| http_build_query() | Generate URL-encoded query string | URL |
| http_clear_last_response_headers() | Clears the stored HTTP response headers | Network |
| http_get_last_response_headers() | Retrieve last HTTP response headers | Network |
| http_response_code() | Get or Set the HTTP response code | Network |
| hypot() | Calculate the length of the hypotenuse of a right-angle triangle | Math |
I
| Function | What it does | Group |
|---|---|---|
| iconv() | Convert a string from one character encoding to another | iconv |
| iconv_get_encoding() | Retrieve internal configuration variables of iconv extension | iconv |
| iconv_mime_decode() | Decodes a MIME header field | iconv |
| iconv_mime_decode_headers() | Decodes multiple MIME header fields at once | iconv |
| iconv_mime_encode() | Composes a MIME header field | iconv |
| iconv_set_encoding() | Set current setting for character encoding conversion | iconv |
| iconv_strlen() | Returns the character count of string | iconv |
| iconv_strpos() | Finds position of first occurrence of a needle within a haystack | iconv |
| iconv_strrpos() | Finds the last occurrence of a needle within a haystack | iconv |
| iconv_substr() | Cut out part of a string | iconv |
| idate() | Format a local time/date part as integer | Date/Time |
| ignore_user_abort() | Set whether a client disconnect should abort script execution | Misc. |
| image_type_to_extension() | Get file extension for image type | GD and Image |
| image_type_to_mime_type() | Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype | GD and Image |
| implode() | Join array elements with a string | String |
| in_array() | Checks if a value exists in an array | Array |
| inet_ntop() | Converts a packed internet address to a human readable representation | Network |
| inet_pton() | Converts a human readable IP address to its packed in_addr representation | Network |
| inflate_add() | Incrementally inflate encoded data | Zlib |
| inflate_get_read_len() | Get number of bytes read so far | Zlib |
| inflate_get_status() | Get decompression status | Zlib |
| inflate_init() | Initialize an incremental inflate context | Zlib |
| ini_alter() | Alias of ini_set() | PHP Options/Info |
| ini_get() | Gets the value of a configuration option | PHP Options/Info |
| ini_get_all() | Gets all configuration options | PHP Options/Info |
| ini_parse_quantity() | Get interpreted size from ini shorthand syntax | PHP Options/Info |
| ini_restore() | Restores the value of a configuration option | PHP Options/Info |
| ini_set() | Sets the value of a configuration option | PHP Options/Info |
| intdiv() | Integer division | Math |
| interface_exists() | Checks if the interface has been defined | Classes/Object |
| intval() | Get the integer value of a variable | Variable handling |
| ip2long() | Converts a string containing an (IPv4) Internet Protocol dotted address into a long integer | Network |
| iptcembed() | Embeds binary IPTC data into a JPEG image | GD and Image |
| iptcparse() | Parse a binary IPTC block into single tags | GD and Image |
| is_a() | Checks whether the object is of a given type or subtype | Classes/Object |
| is_array() | Finds whether a variable is an array | Variable handling |
| is_bool() | Finds out whether a variable is a boolean | Variable handling |
| is_callable() | Verify that a value can be called as a function from the current scope | Variable handling |
| is_countable() | Verify that the contents of a variable is a countable value | Variable handling |
| is_dir() | Tells whether the filename is a directory | Filesystem |
| is_double() | Alias of is_float() | Variable handling |
| is_executable() | Tells whether the filename is executable | Filesystem |
| is_file() | Tells whether the filename is a regular file | Filesystem |
| is_finite() | Checks whether a float is finite | Math |
| is_float() | Finds whether the type of a variable is float | Variable handling |
| is_infinite() | Checks whether a float is infinite | Math |
| is_int() | Find whether the type of a variable is integer | Variable handling |
| is_integer() | Alias of is_int() | Variable handling |
| is_iterable() | Verify that the contents of a variable is an iterable value | Variable handling |
| is_link() | Tells whether the filename is a symbolic link | Filesystem |
| is_long() | Alias of is_int() | Variable handling |
| is_nan() | Checks whether a float is NAN | Math |
| is_null() | Finds whether a variable is null | Variable handling |
| is_numeric() | Finds whether a variable is a number or a numeric string | Variable handling |
| is_object() | Finds whether a variable is an object | Variable handling |
| is_readable() | Tells whether a file exists and is readable | Filesystem |
| is_resource() | Finds whether a variable is a resource | Variable handling |
| is_scalar() | Finds whether a variable is a scalar | Variable handling |
| is_string() | Find whether the type of a variable is string | Variable handling |
| is_subclass_of() | Checks if the object has this class as one of its parents or implements it | Classes/Object |
| is_uploaded_file() | Tells whether the file was uploaded via HTTP POST | Filesystem |
| is_writable() | Tells whether the filename is writable | Filesystem |
| is_writeable() | Alias of is_writable() | Filesystem |
| iterator_apply() | Call a function for every element in an iterator | SPL |
| iterator_count() | Count the elements in an iterator | SPL |
| iterator_to_array() | Copy the iterator into an array | SPL |
J
| Function | What it does | Group |
|---|---|---|
| join() | Alias of implode() | String |
| json_decode() | Decodes a JSON string | JSON |
| json_encode() | Returns the JSON representation of a value | JSON |
| json_last_error() | Returns the last error occurred | JSON |
| json_last_error_msg() | Returns the error string of the last json_validate(), json_encode() or json_decode() call | JSON |
| json_validate() | Checks if a string contains valid JSON | JSON |
K
| Function | What it does | Group |
|---|---|---|
| key() | Fetch a key from an array | Array |
| key_exists() | Alias of array_key_exists() | Array |
| krsort() | Sort an array by key in descending order | Array |
| ksort() | Sort an array by key in ascending order | Array |
L
| Function | What it does | Group |
|---|---|---|
| lcfirst() | Make a string's first character lowercase | String |
| lcg_value() | Combined linear congruential generator | Random |
| lchgrp() | Changes group ownership of symlink | Filesystem |
| lchown() | Changes user ownership of symlink | Filesystem |
| levenshtein() | Calculate Levenshtein distance between two strings | String |
| libxml_clear_errors() | Clear libxml error buffer | libxml |
| libxml_disable_entity_loader() | Disable the ability to load external entities | libxml |
| libxml_get_errors() | Retrieve array of errors | libxml |
| libxml_get_external_entity_loader() | Get the current external entity loader | libxml |
| libxml_get_last_error() | Retrieve last error from libxml | libxml |
| libxml_set_external_entity_loader() | Changes the default external entity loader | libxml |
| libxml_set_streams_context() | Set the streams context for the next libxml document load or write | libxml |
| libxml_use_internal_errors() | Disable libxml errors and allow user to fetch error information as needed | libxml |
| link() | Create a hard link | Filesystem |
| linkinfo() | Gets information about a link | Filesystem |
| localeconv() | Get numeric formatting information | String |
| localtime() | Get the local time | Date/Time |
| log() | Natural logarithm | Math |
| log10() | Base-10 logarithm | Math |
| log1p() | Returns log(1 + number), computed in a way that is accurate even when the value of number is close to zero | Math |
| long2ip() | Converts a long integer address into a string in (IPv4) Internet standard dotted format | Network |
| lstat() | Gives information about a file or symbolic link | Filesystem |
| ltrim() | Strip whitespace (or other characters) from the beginning of a string | String |
M
| Function | What it does | Group |
|---|---|---|
| mail() | Send mail | |
| max() | Find highest value | Math |
| mb_check_encoding() | Check if strings are valid for the specified encoding | Multibyte String |
| mb_chr() | Return character by Unicode code point value | Multibyte String |
| mb_convert_case() | Perform case folding on a string | Multibyte String |
| mb_convert_encoding() | Convert a string from one character encoding to another | Multibyte 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 field | Multibyte String |
| mb_decode_numericentity() | Decode HTML numeric string reference to character | Multibyte String |
| mb_detect_encoding() | Detect character encoding | Multibyte String |
| mb_detect_order() | Set/Get character encoding detection order | Multibyte String |
| mb_encode_mimeheader() | Encode string for MIME header | Multibyte String |
| mb_encode_numericentity() | Encode character to HTML numeric string reference | Multibyte String |
| mb_encoding_aliases() | Get aliases of a known encoding type | Multibyte String |
| mb_ereg() | Regular expression match with multibyte support | Multibyte String |
| mb_ereg_match() | Regular expression match for multibyte string | Multibyte String |
| mb_ereg_replace() | Replace regular expression with multibyte support | Multibyte String |
| mb_ereg_replace_callback() | Perform a regular expression search and replace with multibyte support using a callback | Multibyte String |
| mb_ereg_search() | Multibyte regular expression match for predefined multibyte string | Multibyte String |
| mb_ereg_search_getpos() | Returns start point for next regular expression match | Multibyte String |
| mb_ereg_search_getregs() | Retrieve the result from the last multibyte regular expression match | Multibyte String |
| mb_ereg_search_init() | Setup string and regular expression for a multibyte regular expression match | Multibyte String |
| mb_ereg_search_pos() | Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string | Multibyte String |
| mb_ereg_search_regs() | Returns the matched part of a multibyte regular expression | Multibyte String |
| mb_ereg_search_setpos() | Set start point of next regular expression match | Multibyte String |
| mb_eregi() | Regular expression match ignoring case with multibyte support | Multibyte String |
| mb_eregi_replace() | Replace regular expression with multibyte support ignoring case | Multibyte String |
| mb_get_info() | Get internal settings of mbstring | Multibyte String |
| mb_http_input() | Detect HTTP input character encoding | Multibyte String |
| mb_http_output() | Set/Get HTTP output character encoding | Multibyte String |
| mb_internal_encoding() | Set/Get internal character encoding | Multibyte String |
| mb_language() | Set/Get current language | Multibyte String |
| mb_lcfirst() | Make a string's first character lowercase | Multibyte String |
| mb_list_encodings() | Returns an array of all supported encodings | Multibyte String |
| mb_ltrim() | Strip whitespace (or other characters) from the beginning of a string | Multibyte String |
| mb_ord() | Get Unicode code point of character | Multibyte String |
| mb_output_handler() | Callback function converts character encoding in output buffer | Multibyte String |
| mb_parse_str() | Parse GET/POST/COOKIE data and set global variable | Multibyte String |
| mb_preferred_mime_name() | Get MIME charset string | Multibyte String |
| mb_regex_encoding() | Set/Get character encoding for multibyte regex | Multibyte String |
| mb_regex_set_options() | Set/Get the default options for mbregex functions | Multibyte String |
| mb_rtrim() | Strip whitespace (or other characters) from the end of a string | Multibyte String |
| mb_scrub() | Replace ill-formed byte sequences with the substitute character | Multibyte String |
| mb_send_mail() | Send encoded mail | Multibyte String |
| mb_split() | Split multibyte string using regular expression | Multibyte String |
| mb_str_pad() | Pad a multibyte string to a certain length with another multibyte string | Multibyte String |
| mb_str_split() | Given a multibyte string, return an array of its characters | Multibyte String |
| mb_strcut() | Get part of string | Multibyte String |
| mb_strimwidth() | Get truncated string with specified width | Multibyte String |
| mb_stripos() | Finds position of first occurrence of a string within another, case insensitive | Multibyte String |
| mb_stristr() | Finds first occurrence of a string within another, case insensitive | Multibyte String |
| mb_strlen() | Get string length | Multibyte String |
| mb_strpos() | Find position of first occurrence of string in a string | Multibyte String |
| mb_strrchr() | Finds the last occurrence of a character in a string within another | Multibyte String |
| mb_strrichr() | Finds the last occurrence of a character in a string within another, case insensitive | Multibyte String |
| mb_strripos() | Finds position of last occurrence of a string within another, case insensitive | Multibyte String |
| mb_strrpos() | Find position of last occurrence of a string in a string | Multibyte String |
| mb_strstr() | Finds first occurrence of a string within another | Multibyte String |
| mb_strtolower() | Make a string lowercase | Multibyte String |
| mb_strtoupper() | Make a string uppercase | Multibyte String |
| mb_strwidth() | Return width of string | Multibyte String |
| mb_substitute_character() | Set/Get substitution character | Multibyte String |
| mb_substr() | Get part of string | Multibyte String |
| mb_substr_count() | Count the number of substring occurrences | Multibyte String |
| mb_trim() | Strip whitespace (or other characters) from the beginning and end of a string | Multibyte String |
| mb_ucfirst() | Make a string's first character uppercase | Multibyte String |
| md5() | Calculate the md5 hash of a string | String |
| md5_file() | Calculates the md5 hash of a given file | String |
| memory_get_peak_usage() | Returns the peak of memory allocated by PHP | PHP Options/Info |
| memory_get_usage() | Returns the amount of memory allocated to the PHP script, or reserved from the system by PHP's memory manager | PHP Options/Info |
| memory_reset_peak_usage() | Reset the peak memory usage | PHP Options/Info |
| metaphone() | Calculate the metaphone key of a string | String |
| method_exists() | Checks if the class method exists | Classes/Object |
| mhash() | Computes hash | Mhash |
| mhash_count() | Gets the highest available hash ID | Mhash |
| mhash_get_block_size() | Gets the block size of the specified hash | Mhash |
| mhash_get_hash_name() | Gets the name of the specified hash | Mhash |
| mhash_keygen_s2k() | Generates a key | Mhash |
| microtime() | Return current Unix timestamp with microseconds | Date/Time |
| min() | Find lowest value | Math |
| mkdir() | Makes directory | Filesystem |
| mktime() | Get Unix timestamp for a date | Date/Time |
| move_uploaded_file() | Moves an uploaded file to a new location | Filesystem |
| mt_getrandmax() | Show largest possible random value | Random |
| mt_rand() | Generate a random value via the Mersenne Twister Random Number Generator | Random |
| mt_srand() | Seeds the Mersenne Twister Random Number Generator | Random |
N
| Function | What it does | Group |
|---|---|---|
| natcasesort() | Sort an array using a case insensitive "natural order" algorithm | Array |
| natsort() | Sort an array using a "natural order" algorithm | Array |
| net_get_interfaces() | Get network interfaces | Network |
| next() | Advance the internal pointer of an array | Array |
| nl2br() | Inserts HTML line breaks before all newlines in a string | String |
| nl_langinfo() | Query language and locale information | String |
| number_format() | Format a number with grouped thousands | String |
O
| Function | What it does | Group |
|---|---|---|
| ob_clean() | Clean (erase) the contents of the active output buffer | Output Control |
| ob_end_clean() | Clean (erase) the contents of the active output buffer and turn it off | Output Control |
| ob_end_flush() | Flush (send) the return value of the active output handler and turn the active output buffer off | Output Control |
| ob_flush() | Flush (send) the return value of the active output handler | Output Control |
| ob_get_clean() | Get the contents of the active output buffer and turn it off | Output Control |
| ob_get_contents() | Return the contents of the output buffer | Output 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 off | Output Control |
| ob_get_length() | Return the length of the output buffer | Output Control |
| ob_get_level() | Return the nesting level of the output buffering mechanism | Output Control |
| ob_get_status() | Get status of output buffers | Output Control |
| ob_gzhandler() | ob_start callback function to gzip output buffer | Zlib |
| ob_implicit_flush() | Turn implicit flush on/off | Output Control |
| ob_list_handlers() | List all output handlers in use | Output Control |
| ob_start() | Turn on output buffering | Output Control |
| octdec() | Octal to decimal | Math |
| opendir() | Open directory handle | Directory |
| openlog() | Open connection to system logger | Network |
| ord() | Convert the first byte of a string to a value between 0 and 255 | String |
| output_add_rewrite_var() | Add URL rewriter values | Output Control |
| output_reset_rewrite_vars() | Reset URL rewriter values | Output Control |
P
| Function | What it does | Group |
|---|---|---|
| pack() | Pack data into binary string | Misc. |
| parse_ini_file() | Parse a configuration file | Filesystem |
| parse_ini_string() | Parse a configuration string | Filesystem |
| parse_str() | Parse a string as a URL query string | String |
| parse_url() | Parse a URL and return its components | URL |
| passthru() | Execute an external program and display raw output | Program execution |
| password_algos() | Get available password hashing algorithm IDs | Password Hashing |
| password_get_info() | Returns information about the given hash | Password Hashing |
| password_hash() | Creates a password hash | Password Hashing |
| password_needs_rehash() | Checks if the given hash matches the given options | Password Hashing |
| password_verify() | Verifies that a password matches a hash | Password Hashing |
| pathinfo() | Returns information about a file path | Filesystem |
| pclose() | Closes process file pointer | Filesystem |
| pfsockopen() | Open persistent Internet or Unix domain socket connection | Network |
| php_ini_loaded_file() | Retrieve a path to the loaded php.ini file | PHP Options/Info |
| php_ini_scanned_files() | Return a list of .ini files parsed from the additional ini dir | PHP Options/Info |
| php_sapi_name() | Returns the type of interface between web server and PHP | PHP Options/Info |
| php_strip_whitespace() | Return source with stripped comments and whitespace | Misc. |
| php_uname() | Returns information about the operating system PHP is running on | PHP Options/Info |
| phpcredits() | Prints out the credits for PHP | PHP Options/Info |
| phpinfo() | Outputs information about PHP's configuration | PHP Options/Info |
| phpversion() | Gets the current PHP version | PHP Options/Info |
| pi() | Get value of pi | Math |
| popen() | Opens process file pointer | Filesystem |
| pos() | Alias of current() | Array |
| pow() | Exponential expression | Math |
| preg_filter() | Perform a regular expression search and replace | PCRE |
| preg_grep() | Return array entries that match the pattern | PCRE |
| preg_last_error() | Returns the error code of the last PCRE regex execution | PCRE |
| preg_last_error_msg() | Returns the error message of the last PCRE regex execution | PCRE |
| preg_match() | Perform a regular expression match | PCRE |
| preg_match_all() | Perform a global regular expression match | PCRE |
| preg_quote() | Quote regular expression characters | PCRE |
| preg_replace() | Perform a regular expression search and replace | PCRE |
| preg_replace_callback() | Perform a regular expression search and replace using a callback | PCRE |
| preg_replace_callback_array() | Perform a regular expression search and replace using callbacks | PCRE |
| preg_split() | Split string by a regular expression | PCRE |
| prev() | Rewind the internal array pointer | Array |
| print_r() | Prints human-readable information about a variable | Variable handling |
| printf() | Output a formatted string | String |
| proc_close() | Close pipes to a process opened by proc_open(), wait for it to terminate, and return its exit code | Program execution |
| proc_get_status() | Get information about a process opened by proc_open() | Program execution |
| proc_nice() | Change the priority of the current process | Program execution |
| proc_open() | Execute a command and open file pointers for input/output | Program execution |
| proc_terminate() | Kills a process opened by proc_open | Program execution |
| property_exists() | Checks if the object or class has a property | Classes/Object |
| putenv() | Sets the value of an environment variable | PHP Options/Info |
Q
| Function | What it does | Group |
|---|---|---|
| quoted_printable_decode() | Convert a quoted-printable string to an 8 bit string | String |
| quoted_printable_encode() | Convert a 8 bit string to a quoted-printable string | String |
| quotemeta() | Quote meta characters | String |
R
| Function | What it does | Group |
|---|---|---|
| rad2deg() | Converts the radian number to the equivalent number in degrees | Math |
| rand() | Generate a random integer | Random |
| random_bytes() | Get cryptographically secure random bytes | Random |
| random_int() | Get a cryptographically secure, uniformly selected integer | Random |
| range() | Create an array containing a range of elements | Array |
| rawurldecode() | Decode URL-encoded strings | URL |
| rawurlencode() | URL-encode according to RFC 3986 | URL |
| readdir() | Read entry from directory handle | Directory |
| readfile() | Outputs a file | Filesystem |
| readgzfile() | Output a gz-file | Zlib |
| readline() | Reads a line | Readline |
| readline_add_history() | Adds a line to the history | Readline |
| readline_callback_handler_install() | Initializes the readline callback interface and terminal, prints the prompt and returns immediately | Readline |
| readline_callback_handler_remove() | Removes a previously installed callback handler and restores terminal settings | Readline |
| readline_callback_read_char() | Reads a character and informs the readline callback interface when a line is received | Readline |
| readline_clear_history() | Clears the history | Readline |
| readline_completion_function() | Registers a completion function | Readline |
| readline_info() | Gets/sets various internal readline variables | Readline |
| readline_list_history() | Lists the history | Readline |
| readline_on_new_line() | Inform readline that the cursor has moved to a new line | Readline |
| readline_read_history() | Reads the history | Readline |
| readline_redisplay() | Redraws the display | Readline |
| readline_write_history() | Writes the history | Readline |
| readlink() | Returns the target of a symbolic link | Filesystem |
| realpath() | Returns canonicalized absolute pathname | Filesystem |
| realpath_cache_get() | Get realpath cache entries | Filesystem |
| realpath_cache_size() | Get realpath cache size | Filesystem |
| register_shutdown_function() | Register a function for execution on shutdown | Function handling |
| register_tick_function() | Register a function for execution on each tick | Function handling |
| rename() | Renames a file or directory | Filesystem |
| request_parse_body() | Read and parse the request body and return the result | Network |
| reset() | Set the internal pointer of an array to its first element | Array |
| restore_error_handler() | Restores the previous error handler function | Error Handling |
| restore_exception_handler() | Restores the previously defined exception handler function | Error Handling |
| rewind() | Rewind the position of a file pointer | Filesystem |
| rewinddir() | Rewind directory handle | Directory |
| rmdir() | Removes directory | Filesystem |
| round() | Rounds a float | Math |
| rsort() | Sort an array in descending order | Array |
| rtrim() | Strip whitespace (or other characters) from the end of a string | String |
S
| Function | What it does | Group |
|---|---|---|
| sapi_windows_cp_conv() | Convert string from one codepage to another | Misc. |
| sapi_windows_cp_get() | Get current codepage | Misc. |
| sapi_windows_cp_is_utf8() | Indicates whether the codepage is UTF-8 compatible | Misc. |
| sapi_windows_cp_set() | Set process codepage | Misc. |
| sapi_windows_generate_ctrl_event() | Send a CTRL event to another process | Misc. |
| sapi_windows_set_ctrl_handler() | Set or remove a CTRL event handler | Misc. |
| 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 path | Directory |
| serialize() | Generates a storable representation of a value | Variable handling |
| session_abort() | Discard session array changes and finish session | Session |
| session_cache_expire() | Get and/or set current cache expire | Session |
| session_cache_limiter() | Get and/or set the current cache limiter | Session |
| session_commit() | Alias of session_write_close() | Session |
| session_create_id() | Create new session id | Session |
| session_decode() | Decodes session data from a session encoded string | Session |
| session_destroy() | Destroys all data registered to a session | Session |
| session_encode() | Encodes the current session data as a session encoded string | Session |
| session_gc() | Perform session data garbage collection | Session |
| session_get_cookie_params() | Get the session cookie parameters | Session |
| session_id() | Get and/or set the current session id | Session |
| session_module_name() | Get and/or set the current session module | Session |
| session_name() | Get and/or set the current session name | Session |
| session_regenerate_id() | Update the current session id with a newly generated one | Session |
| session_register_shutdown() | Session shutdown function | Session |
| session_reset() | Re-initialize session array with original values | Session |
| session_save_path() | Get and/or set the current session save path | Session |
| session_set_cookie_params() | Set the session cookie parameters | Session |
| session_set_save_handler() | Sets user-level session storage functions | Session |
| session_start() | Start new or resume existing session | Session |
| session_status() | Returns the current session status | Session |
| session_unset() | Free all session variables | Session |
| session_write_close() | Write session data and end session | Session |
| set_error_handler() | Sets a user-defined error handler function | Error Handling |
| set_exception_handler() | Sets a user-defined exception handler function | Error Handling |
| set_file_buffer() | Alias of stream_set_write_buffer() | Filesystem |
| set_include_path() | Sets the include_path configuration option | PHP Options/Info |
| set_time_limit() | Limits the maximum execution time | PHP Options/Info |
| setcookie() | Send a cookie | Network |
| setlocale() | Set locale information | String |
| setrawcookie() | Send a cookie without urlencoding the cookie value | Network |
| settype() | Set the type of a variable | Variable handling |
| sha1() | Calculate the sha1 hash of a string | String |
| sha1_file() | Calculate the sha1 hash of a file | String |
| shell_exec() | Execute command via shell and return the complete output as a string | Program execution |
| show_source() | Alias of highlight_file() | Misc. |
| shuffle() | Shuffle an array | Array |
| similar_text() | Calculate the similarity between two strings | String |
| simplexml_import_dom() | Get a SimpleXMLElement object from an XML or HTML node | SimpleXML |
| simplexml_load_file() | Interprets an XML file into an object | SimpleXML |
| simplexml_load_string() | Interprets a string of XML into an object | SimpleXML |
| sin() | Sine | Math |
| sinh() | Hyperbolic sine | Math |
| sizeof() | Alias of count() | Array |
| sleep() | Delay execution | Misc. |
| 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 order | Array |
| soundex() | Calculate the soundex key of a string | String |
| spl_autoload() | Default implementation for __autoload() | SPL |
| spl_autoload_call() | Try all registered __autoload() functions to load the requested class | SPL |
| spl_autoload_extensions() | Register and return default file extensions for spl_autoload | SPL |
| spl_autoload_functions() | Return all registered __autoload() functions | SPL |
| spl_autoload_register() | Register given function as __autoload() implementation | SPL |
| spl_autoload_unregister() | Unregister given function as __autoload() implementation | SPL |
| spl_classes() | Return available SPL classes | SPL |
| spl_object_hash() | Return hash id for given object | SPL |
| spl_object_id() | Return the integer object handle for given object | SPL |
| sprintf() | Return a formatted string | String |
| sqrt() | Square root | Math |
| srand() | Seed the random number generator | Random |
| sscanf() | Parses input from a string according to a format | String |
| stat() | Gives information about a file | Filesystem |
| str_contains() | Determine if a string contains a given substring | String |
| str_decrement() | Decrement an alphanumeric string | String |
| str_ends_with() | Checks if a string ends with a given substring | String |
| str_getcsv() | Parse a CSV string into an array | String |
| str_increment() | Increment an alphanumeric string | String |
| str_ireplace() | Case-insensitive version of str_replace() | String |
| str_pad() | Pad a string to a certain length with another string | String |
| str_repeat() | Repeat a string | String |
| str_replace() | Replace all occurrences of the search string with the replacement string | String |
| str_rot13() | Perform the rot13 transform on a string | String |
| str_shuffle() | Randomly shuffles a string | String |
| str_split() | Convert a string to an array | String |
| str_starts_with() | Checks if a string starts with a given substring | String |
| str_word_count() | Return information about words used in a string | String |
| strcasecmp() | Binary safe case-insensitive string comparison | String |
| strchr() | Alias of strstr() | String |
| strcmp() | Binary safe string comparison | String |
| strcoll() | Locale based string comparison | String |
| strcspn() | Find length of initial segment not matching mask | String |
| stream_bucket_append() | Append bucket to brigade | Stream |
| stream_bucket_make_writeable() | Returns a bucket object from the brigade to operate on | Stream |
| stream_bucket_new() | Create a new bucket for use on the current stream | Stream |
| stream_bucket_prepend() | Prepend bucket to brigade | Stream |
| stream_context_create() | Creates a stream context | Stream |
| stream_context_get_default() | Retrieve the default stream context | Stream |
| stream_context_get_options() | Retrieve options for a stream/wrapper/context | Stream |
| stream_context_get_params() | Retrieves parameters from a context | Stream |
| stream_context_set_default() | Set the default stream context | Stream |
| stream_context_set_option() | Sets an option for a stream/wrapper/context | Stream |
| stream_context_set_options() | Sets options on the specified context | Stream |
| stream_context_set_params() | Set parameters for a stream/wrapper/context | Stream |
| stream_copy_to_stream() | Copies data from one stream to another | Stream |
| stream_filter_append() | Attach a filter to a stream | Stream |
| stream_filter_prepend() | Attach a filter to a stream | Stream |
| stream_filter_register() | Register a user defined stream filter | Stream |
| stream_filter_remove() | Remove a filter from a stream | Stream |
| stream_get_contents() | Reads remainder of a stream into a string | Stream |
| stream_get_filters() | Retrieve list of registered filters | Stream |
| stream_get_line() | Gets line from stream resource up to a given delimiter | Stream |
| stream_get_meta_data() | Retrieves header/meta data from streams/file pointers | Stream |
| stream_get_transports() | Retrieve list of registered socket transports | Stream |
| stream_get_wrappers() | Retrieve list of registered streams | Stream |
| stream_is_local() | Checks if a stream is a local stream | Stream |
| stream_isatty() | Check if a stream is a TTY | Stream |
| stream_register_wrapper() | Alias of stream_wrapper_register() | Stream |
| stream_resolve_include_path() | Resolve filename against the include path | Stream |
| stream_select() | Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by seconds and microseconds | Stream |
| stream_set_blocking() | Set blocking/non-blocking mode on a stream | Stream |
| stream_set_chunk_size() | Set the stream chunk size | Stream |
| stream_set_read_buffer() | Set read file buffering on the given stream | Stream |
| stream_set_timeout() | Set timeout period on a stream | Stream |
| stream_set_write_buffer() | Sets write file buffering on the given stream | Stream |
| stream_socket_accept() | Accept a connection on a socket created by stream_socket_server() | Stream |
| stream_socket_client() | Open Internet or Unix domain socket connection | Stream |
| stream_socket_enable_crypto() | Turns encryption on/off on an already connected socket | Stream |
| stream_socket_get_name() | Retrieve the name of the local or remote sockets | Stream |
| stream_socket_pair() | Creates a pair of connected, indistinguishable socket streams | Stream |
| stream_socket_recvfrom() | Receives data from a socket, connected or not | Stream |
| stream_socket_sendto() | Sends a message to a socket, whether it is connected or not | Stream |
| stream_socket_server() | Create an Internet or Unix domain server socket | Stream |
| stream_socket_shutdown() | Shutdown a full-duplex connection | Stream |
| stream_supports_lock() | Tells whether the stream supports locking | Stream |
| stream_wrapper_register() | Register a URL wrapper implemented as a PHP class | Stream |
| stream_wrapper_restore() | Restores a previously unregistered built-in wrapper | Stream |
| stream_wrapper_unregister() | Unregister a URL wrapper | Stream |
| strftime() | Format a local time/date according to locale settings | Date/Time |
| strip_tags() | Strip HTML and PHP tags from a string | String |
| stripcslashes() | Un-quote string quoted with addcslashes() | String |
| stripos() | Find the position of the first occurrence of a case-insensitive substring in a string | String |
| stripslashes() | Un-quotes a quoted string | String |
| stristr() | Case-insensitive strstr() | String |
| strlen() | Get string length | String |
| strnatcasecmp() | Case insensitive string comparisons using a "natural order" algorithm | String |
| strnatcmp() | String comparisons using a "natural order" algorithm | String |
| strncasecmp() | Binary safe case-insensitive string comparison of the first n characters | String |
| strncmp() | Binary safe string comparison of the first n characters | String |
| strpbrk() | Search a string for any of a set of characters | String |
| strpos() | Find the position of the first occurrence of a substring in a string | String |
| strptime() | Parse a time/date generated with strftime() | Date/Time |
| strrchr() | Find the last occurrence of a character in a string | String |
| strrev() | Reverse a string | String |
| strripos() | Find the position of the last occurrence of a case-insensitive substring in a string | String |
| strrpos() | Find the position of the last occurrence of a substring in a string | String |
| strspn() | Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask | String |
| strstr() | Find the first occurrence of a string | String |
| strtok() | Tokenize string | String |
| strtolower() | Make a string lowercase | String |
| strtotime() | Parse about any English textual datetime description into a Unix timestamp | Date/Time |
| strtoupper() | Make a string uppercase | String |
| strtr() | Translate characters or replace substrings | String |
| strval() | Get string value of a variable | Variable handling |
| substr() | Return part of a string | String |
| substr_compare() | Binary safe comparison of two strings from an offset, up to length characters | String |
| substr_count() | Count the number of substring occurrences | String |
| substr_replace() | Replace text within a portion of a string | String |
| symlink() | Creates a symbolic link | Filesystem |
| sys_get_temp_dir() | Returns directory path used for temporary files | PHP Options/Info |
| sys_getloadavg() | Gets system load average | Misc. |
| syslog() | Generate a system log message | Network |
| system() | Execute an external program and display the output | Program execution |
T
| Function | What it does | Group |
|---|---|---|
| tan() | Tangent | Math |
| tanh() | Hyperbolic tangent | Math |
| tempnam() | Create file with unique file name | Filesystem |
| time() | Return current Unix timestamp | Date/Time |
| time_nanosleep() | Delay for a number of seconds and nanoseconds | Misc. |
| time_sleep_until() | Make the script sleep until the specified time | Misc. |
| 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 offset | Date/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 timezonedb | Date/Time |
| tmpfile() | Creates a temporary file | Filesystem |
| token_get_all() | Split given source into PHP tokens | Tokenizer |
| token_name() | Get the symbolic name of a given PHP token | Tokenizer |
| touch() | Sets access and modification time of file | Filesystem |
| trait_exists() | Checks if the trait exists | Classes/Object |
| trigger_error() | Generates a user-level error/warning/notice message | Error Handling |
| trim() | Strip whitespace (or other characters) from the beginning and end of a string | String |
U
| Function | What it does | Group |
|---|---|---|
| uasort() | Sort an array with a user-defined comparison function and maintain index association | Array |
| ucfirst() | Make a string's first character uppercase | String |
| ucwords() | Uppercase the first character of each word in a string | String |
| uksort() | Sort an array by keys using a user-defined comparison function | Array |
| umask() | Changes the current umask | Filesystem |
| uniqid() | Generate a time-based identifier | Misc. |
| unlink() | Deletes a file | Filesystem |
| unpack() | Unpack data from binary string | Misc. |
| unregister_tick_function() | De-register a function for execution on each tick | Function handling |
| unserialize() | Creates a PHP value from a stored representation | Variable handling |
| urldecode() | Decodes URL-encoded string | URL |
| urlencode() | URL-encodes string | URL |
| user_error() | Alias of trigger_error() | Error Handling |
| usleep() | Delay execution in microseconds | Misc. |
| usort() | Sort an array by values using a user-defined comparison function | Array |
| utf8_decode() | Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable characters | String |
| utf8_encode() | Converts a string from ISO-8859-1 to UTF-8 | String |
V
| Function | What it does | Group |
|---|---|---|
| var_dump() | Dumps information about a variable | Variable handling |
| var_export() | Outputs or returns a parsable string representation of a variable | Variable handling |
| version_compare() | Compares two "PHP-standardized" version number strings | PHP Options/Info |
| vfprintf() | Write a formatted string to a stream | String |
| vprintf() | Output a formatted string | String |
| vsprintf() | Return a formatted string | String |
W
| Function | What it does | Group |
|---|---|---|
| wordwrap() | Wraps a string to a given number of characters | String |
X
| Function | What it does | Group |
|---|---|---|
| xml_error_string() | Get XML parser error string | XML Parser |
| xml_get_current_byte_index() | Get current byte index for an XML parser | XML Parser |
| xml_get_current_column_number() | Get current column number for an XML parser | XML Parser |
| xml_get_current_line_number() | Get current line number for an XML parser | XML Parser |
| xml_get_error_code() | Get XML parser error code | XML Parser |
| xml_parse() | Start parsing an XML document | XML Parser |
| xml_parse_into_struct() | Parse XML data into an array structure | XML Parser |
| xml_parser_create() | Create an XML parser | XML Parser |
| xml_parser_create_ns() | Create an XML parser with namespace support | XML Parser |
| xml_parser_free() | Free an XML parser | XML Parser |
| xml_parser_get_option() | Get options from an XML parser | XML Parser |
| xml_parser_set_option() | Set options in an XML parser | XML Parser |
| xml_set_character_data_handler() | Set up character data handler | XML Parser |
| xml_set_default_handler() | Set up default handler | XML Parser |
| xml_set_element_handler() | Set up start and end element handlers | XML Parser |
| xml_set_end_namespace_decl_handler() | Set up end namespace declaration handler | XML Parser |
| xml_set_external_entity_ref_handler() | Set up external entity reference handler | XML Parser |
| xml_set_notation_decl_handler() | Set up notation declaration handler | XML Parser |
| xml_set_object() | Use XML Parser within an object | XML Parser |
| xml_set_processing_instruction_handler() | Set up processing instruction (PI) handler | XML Parser |
| xml_set_start_namespace_decl_handler() | Set up start namespace declaration handler | XML Parser |
| xml_set_unparsed_entity_decl_handler() | Set up unparsed entity declaration handler | XML Parser |
Z
| Function | What it does | Group |
|---|---|---|
| zend_thread_id() | Returns a unique identifier for the current thread | PHP Options/Info |
| zend_version() | Gets the version of the current Zend engine | PHP Options/Info |
| zlib_decode() | Uncompress any raw/gzip/zlib encoded data | Zlib |
| zlib_encode() | Compress data with the specified encoding | Zlib |
| zlib_get_coding_type() | Returns the coding type used for output compression | Zlib |
Source: the PHP manual, Function Reference (CC BY 3.0). Pages were generated from the manual text; corrections go to info@aredel.com.