OnlinePHP.io Functions


Find your function:


Arrays

Cryptography and Hashing
  • hash - Generate a hash value (message digest)
  • hash_algos - Return a list of registered hashing algorithms
  • hash_equals - Timing attack safe string comparison
  • hash_hkdf - Generate a HKDF key derivation of a supplied key input
  • hash_hmac - Generate a keyed hash value using the HMAC method
  • hash_hmac_algos - Return a list of registered hashing algorithms suitable for hash_hmac
  • hash_pbkdf2 - Generate a PBKDF2 key derivation of a supplied password

Custom tools

Date and Time
  • strtotime - Parse about any English textual datetime description into a Unix timestamp

Filesystem

General
  • hex2bin - Decodes a hexadecimally encoded binary string
  • json_decode - Decodes a JSON string
  • json_encode - Returns the JSON representation of a value
  • serialize - Generates a storable representation of a value
  • uniqid - Generate a unique ID
  • unserialize - Creates a PHP value from a stored representation

Math
  • abs - Absolute value
  • acos - Arc cosine
  • acosh - Inverse hyperbolic cosine
  • asin - Arc sine
  • asinh - Inverse hyperbolic sine
  • atan - Arc tangent
  • atan2 - Arc tangent of two variables
  • atanh - Inverse hyperbolic tangent
  • base_convert - Convert a number between arbitrary bases
  • bindec - Binary to decimal
  • ceil - Round fractions up
  • cos - Cosine
  • cosh - Hyperbolic cosine
  • decbin - Decimal to binary
  • dechex - Decimal to hexadecimal
  • decoct - Decimal to octal
  • deg2rad - Converts the number in degrees to the radian equivalent
  • exp - Calculates the exponent of e
  • expm1 - Returns exp(number) - 1, computed in a way that is accurate even when the value of number is close to zero
  • fdiv - Divides two numbers, according to IEEE 754
  • floor - Round fractions down
  • fmod - Returns the floating point remainder (modulo) of the division of the arguments
  • getrandmax - Show largest possible random value
  • hexdec - Hexadecimal to decimal
  • hypot - Calculate the length of the hypotenuse of a right-angle triangle
  • intdiv - Integer division
  • is_finite - Finds whether a value is a legal finite number
  • is_infinite - Finds whether a value is infinite
  • is_nan - Finds whether a value is not a number
  • lcg_value - Combined linear congruential generator
  • log - Natural logarithm
  • log10 - Base-10 logarithm
  • log1p - Returns log(1 + number), computed in a way that is accurate even when the value of number is close to zero
  • max - Find highest value
  • min - Find lowest value
  • mt_getrandmax - Show largest possible random value
  • mt_rand - Generate a random value via the Mersenne Twister Random Number Generator
  • mt_srand - Seeds the Mersenne Twister Random Number Generator
  • octdec - Octal to decimal
  • pi - Get value of pi
  • pow - Exponential expression
  • rad2deg - Converts the radian number to the equivalent number in degrees
  • rand - Generate a random integer
  • round - Rounds a float
  • sin - Sine
  • sinh - Hyperbolic sine
  • sqrt - Square root
  • srand - Seed the random number generator
  • tan - Tangent
  • tanh - Hyperbolic tangent

Output Buffering

Password Hashing

Regular Expressions

String Manipulation
  • addcslashes - Quote string with slashes in a C style
  • addslashes - Quote string with slashes
  • bin2hex - Convert binary data into hexadecimal representation
  • chr - Generate a single-byte string from a number
  • chunk_split - Split a string into smaller chunks
  • convert_cyr_string - Convert from one Cyrillic character set to another
  • convert_uudecode - Decode a uuencoded string
  • convert_uuencode - Uuencode a string
  • count_chars - Return information about characters used in a string
  • crc32 - Calculates the crc32 polynomial of a string
  • crypt - One-way string hashing
  • explode - Split a string by a string
  • get_html_translation_table - Returns the translation table used by htmlspecialchars and htmlentities
  • hebrev - Convert logical Hebrew text to visual text
  • hebrevc - Convert logical Hebrew text to visual text with newline conversion
  • html_entity_decode - Convert HTML entities to their corresponding characters
  • htmlentities - Convert all applicable characters to HTML entities
  • htmlspecialchars - Convert special characters to HTML entities
  • htmlspecialchars_decode - Convert special HTML entities back to characters
  • iconv - Convert a string from one character encoding to another
  • implode - Join array elements with a string
  • lcfirst - Make a string's first character lowercase
  • levenshtein - Calculate Levenshtein distance between two strings
  • localeconv - Get numeric formatting information
  • ltrim - Strip whitespace (or other characters) from the beginning of a string
  • md5 - Calculate the md5 hash of a string
  • md5_file - Calculates the md5 hash of a given file
  • metaphone - Calculate the metaphone key of a string
  • money_format - Formats a number as a currency string
  • nl_langinfo - Query language and locale information
  • nl2br - Inserts HTML line breaks before all newlines in a string
  • number_format - Format a number with grouped thousands
  • ord - Convert the first byte of a string to a value between 0 and 255
  • parse_str - Parses the string into variables
  • print - Output a string
  • printf - Output a formatted string
  • quoted_printable_decode - Convert a quoted-printable string to an 8 bit string
  • quoted_printable_encode - Convert a 8 bit string to a quoted-printable string
  • quotemeta - Quote meta characters
  • rtrim - Strip whitespace (or other characters) from the end of a string
  • sha1 - Calculate the sha1 hash of a string
  • sha1_file - Calculate the sha1 hash of a file
  • similar_text - Calculate the similarity between two strings
  • soundex - Calculate the soundex key of a string
  • sprintf - Return a formatted string
  • sscanf - Parses input from a string according to a format
  • str_contains - Determine if a string contains a given substring
  • str_ends_with - Checks if a string ends with a given substring
  • str_getcsv - Parse a CSV string into an array
  • str_ireplace - Case-insensitive version of str_replace
  • str_pad - Pad a string to a certain length with another string
  • str_repeat - Repeat a string
  • str_replace - Replace all occurrences of the search string with the replacement string
  • str_rot13 - Perform the rot13 transform on a string
  • str_shuffle - Randomly shuffles a string
  • str_split - Convert a string to an array
  • str_starts_with - Checks if a string starts with a given substring
  • str_word_count - Return information about words used in a string
  • strcasecmp - Binary safe case-insensitive string comparison
  • strcmp - Binary safe string comparison
  • strcoll - Locale based string comparison
  • strcspn - Find length of initial segment not matching mask
  • strip_tags - Strip HTML and PHP tags from a string
  • stripcslashes - Un-quote string quoted with addcslashes
  • stripos - Find the position of the first occurrence of a case-insensitive substring in a string
  • stripslashes - Un-quotes a quoted string
  • stristr - Case-insensitive strstr
  • strlen - Get string length
  • strnatcasecmp - Case insensitive string comparisons using a "natural order" algorithm
  • strnatcmp - String comparisons using a "natural order" algorithm
  • strncasecmp - Binary safe case-insensitive string comparison of the first n characters
  • strncmp - Binary safe string comparison of the first n characters
  • strpbrk - Search a string for any of a set of characters
  • strpos - Find the position of the first occurrence of a substring in a string
  • strrchr - Find the last occurrence of a character in a string
  • strrev - Reverse a string
  • strripos - Find the position of the last occurrence of a case-insensitive substring in a string
  • strrpos - Find the position of the last occurrence of a substring in a string
  • strspn - Finds the length of the initial segment of a string consisting entirely of characters contained within a given mask
  • strstr - Find the first occurrence of a string
  • strtok - Tokenize string
  • strtolower - Make a string lowercase
  • strtoupper - Make a string uppercase
  • strtr - Translate characters or replace substrings
  • substr - Return part of a string
  • substr_compare - Binary safe comparison of two strings from an offset, up to length characters
  • substr_count - Count the number of substring occurrences
  • substr_replace - Replace text within a portion of a string
  • trim - Strip whitespace (or other characters) from the beginning and end of a string
  • ucfirst - Make a string's first character uppercase
  • ucwords - Uppercase the first character of each word in a string
  • utf8_decode - Converts a string from UTF-8 to ISO-8859-1, replacing invalid or unrepresentable characters
  • vprintf - Output a formatted string
  • vsprintf - Return a formatted string
  • wordwrap - Wraps a string to a given number of characters

Urls

PHP Documentation

Online tool Categories

Last used PHP functions

Most used PHP functions