New Functions
PHP 5.2.x introduced some new functions:
PHP Core:
- array_fill_keys() - Create an array using the elements of the first parameter as keys, each initialized to val
-
error_get_last()
- Get the last occurred error as associative array. Returns
NULL
if there hasn't been an error yet - image_type_to_extension() - Get file extension for image-type returned by getimagesize(), exif_read_data(), exif_thumbnail(), exif_imagetype()
- memory_get_peak_usage() - Returns the peak allocated by PHP memory
- sys_get_temp_dir() - Returns directory path used for temporary files. (Added in 5.2.1)
- timezone_abbreviations_list() - Returns associative array containing DST, offset and the timezone name
- timezone_identifiers_list() - Returns numerically indexed array with all timezone identifiers
- timezone_name_from_abbr() - Returns the timezone name from abbreviation
- 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.
- imagegrabscreen() - Grabs a screenshot of the whole screen. As of PHP 5.2.2.
- imagegrabwindow() - Captures a window. As of PHP 5.2.2.
- 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
- openssl_csr_get_public_key() - Extracts public key from a CERT and prepares it for use
- openssl_csr_get_subject() - Returns the subject of a CERT
- openssl_pkey_get_details() - Returns an array with the key details (bits, pkey, type)
spl:
- 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:
- preg_last_error() - Returns the error code of the last regex execution
-
pg_field_table()
- Returns the name of the table field belongs to, or table's oid
if oid_only is
TRUE
- posix_initgroups() - Calculate the group access list for the user specified in name
gmp:
- gmp_nextprime() - Finds next prime number
-
xmlwriter_full_end_element()
- End current element - returns
FALSE
on error -
xmlwriter_write_raw()
- Write text - returns
FALSE
on error -
xmlwriter_start_dtd_entity()
- Create start DTD Entity - returns
FALSE
on error -
xmlwriter_end_dtd_entity()
- End current DTD Entity - returns
FALSE
on error -
xmlwriter_write_dtd_entity()
- Write full DTD Entity tag - returns
FALSE
on error
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-migration52.functions.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.