PHP Handbuch
Zurück | Anhang B. Migrating from PHP 5.1.x to PHP 5.2.x | Weiter

# 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

- 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.

mbstring:

- mb_list_encodings_alias_names() - Returns an array of all supported entity encodings

- mb_list_mime_names() - Returns an array or string of all supported mime names

- 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 pasword]) - Protects

openssl:

- 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

pgsql:

- pg_field_table() - Returns the name of the table field belongs to, or table's oid if oid_only is true

posix:

- bool posix_initgroups(string name, int base_group_id) - Calculate the group access list for the user specified in name

gmp:

- gmp_nextprime() - Finds next prime of a

xmlwriter:

- 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

Zurück | Zum Anfang | Weiter
New Parameters | Nach oben | New Methods