Migration52/functions-Phpdoc专题
New Functions
PHP 5.2.x introduced some new functions:
PHP Core:
- <span class="function">array_fill_keys - Create an array using the elements of the first parameter as keys, each initialized to val
- <span
class="function">error_get_last - Get the last occurred
error as associative array. Returns
nullif there hasn't been an error yet - <span class="function">image_type_to_extension - Get file extension for image-type returned by <span class="function">getimagesize, <span class="function">exif_read_data, <span class="function">exif_thumbnail, <span class="function">exif_imagetype
- <span class="function">memory_get_peak_usage - Returns the peak allocated by PHP memory
- <span class="function">sys_get_temp_dir - Returns directory path used for temporary files. (Added in 5.2.1)
- <span class="function">timezone_abbreviations_list - Returns associative array containing DST, offset and the timezone name
- <span class="function">timezone_identifiers_list - Returns numerically indexed array with all timezone identifiers
- <span class="function">timezone_name_from_abbr - Returns the timezone name from abbreviation
- <span class="function">stream_socket_shutdown - Causes all or part of a full-duplex connection on the socket associated with stream to be shut down. As of PHP 5.2.1.
- <span class="function">imagegrabscreen - Grabs a screenshot of the whole screen. As of PHP 5.2.2.
- <span class="function">imagegrabwindow - Captures a window. As of PHP 5.2.2.
- <span class="function">libxml_disable_entity_loader - Disable the ability to load external entities. As of PHP 5.2.11.
- mb_stripos - Finds position of first occurrence of a string within another, case insensitive
- mb_stristr - Finds first occurrence of a string within another, case insensitive
- mb_strrchr - Finds the last occurrence of a character in a string within another
- mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive
- mb_strripos - Finds position of last occurrence of a string within another, case insensitive
- mb_strstr - Finds first occurrence of a string within another
ming (As of PHP 5.2.1):
- void ming_setSWFCompression(int num) - Sets output compression
- void swfmovie::namedanchor(string name) - Creates anchor
- void swfmovie::protect([string password]) - Protects
- <span class="function">openssl_csr_get_public_key - Extracts public key from a CERT and prepares it for use
- <span class="function">openssl_csr_get_subject - Returns the subject of a CERT
- <span class="function">openssl_pkey_get_details - Returns an array with the key details (bits, pkey, type)
spl:
- <span class="function">spl_object_hash - Return hash id for given object
- int iterator_apply(Traversable it, mixed function [, mixed params]) - Calls a function for every element in an iterator
pcre:
- <span class="function">preg_last_error - Returns the error code of the last regex execution
- <span
class="function">pg_field_table - Returns the name of the
table field belongs to, or table's oid if oid_only is
true
- <span class="function">posix_initgroups - Calculate the group access list for the user specified in name
gmp:
- <span class="function">gmp_nextprime - Finds next prime number
- <span
class="function">xmlwriter_full_end_element - End current
element - returns
falseon error - <span
class="function">xmlwriter_write_raw - Write text - returns
falseon error - <span
class="function">xmlwriter_start_dtd_entity - Create start
DTD Entity - returns
falseon error - <span
class="function">xmlwriter_end_dtd_entity - End current
DTD Entity - returns
falseon error - <span
class="function">xmlwriter_write_dtd_entity - Write full
DTD Entity tag - returns
falseon error