mime_content_type - Detect MIME Content-type for a file (deprecated)

soundex - Calculate the soundex key of a string

metaphone - Calculate the metaphone key of a string

levenshtein - Calculate Levenshtein distance between two strings

similar_text - Calculate the similarity between two strings

setlocale - Set locale information

一些被忽视的 PHP 函数 - 很多没见过的函数

getimagesize - Get the size of an image

fpassthru - Output all remaining data on a file pointer

Alternative syntax for control structures - PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.

ucwords - Returns a string with the first character of each word in str capitalized, if that character is alphabetic.

pcntl_fork - Forks the currently running process.

strpbrk - Search a string for any of a set of characters. 从一个字符串找出符合另一个字符串符合的部分,将其以及之后剩余的部分返回。

strspn - Finds the length of the first segment of a string consisting entirely of characters contained within a given mask. 返回在字符串中包含的特定字符的数目。

This function is significantly faster for checking illegal characters than the equivalent preg_match() method.

strcspn - Find length of initial segment not matching mask. 返回在找到任何指定的字符之前,在字符串查找的字符数。

str_split - Convert a string to an array.

str_word_count - Return information about words used in a string.

setcookie - Send a cookie.

$_COOKIE - An associative array of variables passed to the current script via HTTP Cookies.

assert - assert() will check the given assertion and take appropriate action if its result is FALSE.

lcg_value - Combined linear congruential generator. lcg_value() returns a pseudo random number in the range of (0, 1).

getmypid - Gets PHP's process ID.

strtr - Translate characters or replace substrings.

readdir - Returns the filename of the next file from the directory. The filenames are returned in the order in which they are stored by the filesystem.

get_cfg_var - Gets the value of a PHP configuration option. get_cfg_var returns the value from php.ini directly, while the ini_get returns the runtime config value.

pathinfo - returns an associative array containing information about path.

parse_str - Parses str as if it were the query string passed via a URL and sets variables in the current scope.

error_log - Sends an error message to the web server's error log or to a file.

session_save_handler - session_set_save_handler() sets the user-level session storage functions which are used for storing and retrieving data associated with a session. This is most useful when a storage method other than those supplied by PHP sessions is preferred. i.e. Storing the session data in a local database.