对绑定的扩展的函数有以下更新。
Version | Function | Description |
---|---|---|
Since 5.3.0 | get_class | NULL became the default value for object, so passing NULL to object now has the same result as not passing any value. |
Since 5.0.0 | get_class | The class name is returned in its original notation. |
get_class | The object parameter is optional if called from the object's method. | |
get_parent_class | The object parameter is optional if called from the object's method. | |
Since 4.2.0 | srand | seed 成为可选,省略时会默认使用随机值。 |
Since 4.0.5 | get_parent_class | If object is a string, returns the name of the parent class of the class with that name. |
prior to 5.3.0 | get_object_vars | If the object isn't an object, then get_object_vars would return FALSE |
Prior to 5.1.3 | imagecolorallocatealpha | Returns -1 if the allocation failed. |
Prior to 4.2.0 | get_class_vars | Uninitialized class variables will not be reported by get_class_vars |
prior to 4.2.0 | get_object_vars | If the variables declared in the class of which the object is an instance, have not been assigned a value, those will not be returned in the array |
PHP 5.3.2 (PECL OCI8 1.4) | oci_set_prefetch | Before this release, rows must be >= 1. |
PHP 5.3 (PECL OCI8 1.3.4) | oci_set_prefetch | Before this release, prefetching was limited to the lesser of rows rows and 1024 * rows bytes. The byte size restriction has now been removed. |
Before 5.1.0 | get_parent_class | If called without parameter outside object, this function would have returned NULL with a warning. |
5.5.7 | apache_request_headers | This function became available in the CLI server. |
apache_response_headers | This function became available in the CLI server. | |
getallheaders | This function became available in the CLI server. | |
5.5.2 | DOMDocument::schemaValidate | Added the flags parameter |
DOMDocument::schemaValidateSource | Added the flags parameter | |
5.5.0/PECL 3.0.0 | IntlDateFormatter::create | An IntlCalendar object is allowed for calendar. Objects of type IntlTimeZone and DateTimeZone are allowed for timezone. Invalid timezone identifiers (including empty strings) are no longer allowed for timezone. If NULL is given for timezone, the timezone identifier given by date_default_timezone_get will be used instead of ICUʼs default. |
IntlDateFormatter::format | Support for providing IntlCalendar objects to the value parameter was added. | |
IntlDateFormatter::setCalendar | It became possible to pass an IntlCalendar object. | |
5.5.0 | setcookie | A Max-Age attribute is now included in the Set-Cookie header sent to the client. |
setrawcookie | A Max-Age attribute is now included in the Set-Cookie header sent to the client. | |
SoapClient::SoapClient | New ssl_method option. | |
5.4.7 | parse_url | 修复了 host 在 协议 省略时的识别。 |
5.4.0/PECL 2.0.0b1 | idn_to_ascii | Added the parameters variant and idna_info; UTS #46 support. |
idn_to_utf8 | Added the parameters variant and idna_info; UTS #46 support. | |
5.4.0 | DOMDocument::loadHTML | Added options parameter. |
DOMDocument::loadHTMLFile | Added options parameter. | |
apache_child_terminate | 该函数目前也可以用于FastCGI模式了。以前,它仅在PHP作为Apapche的模块安装时支持。 | |
apache_request_headers | This function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module. | |
apache_response_headers | This function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module. | |
date_default_timezone_get | 不再使用 TZ 来推测时区。 | |
date_default_timezone_get | 不再根据操作系统的信息来推测时区,因为这是不可靠的。 | |
dns_get_record | Added raw parameter. | |
empty | Checking non-numeric offsets of strings returns TRUE. | |
filter_input_array | Added add_empty parameter. | |
filter_var_array | Added add_empty parameter. | |
getallheaders | This function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module. | |
gzcompress | Added encoding parameter. | |
gzdeflate | Added encoding parameter. | |
gzencode | FORCE_DEFLATE now generates RFC 1950 compliant output. | |
hash | The tiger algorithm now uses big-endian byte ordering. | |
hash_algos | Support for joaat, fnv132 and fnv164 was added. Support for Salsa10 and Salsa20 was removed. | |
http_build_query | 加入了 enc_type 参数。 | |
isset | 检查字符的非数字偏移量将会返回 FALSE。 | |
json_decode | The options parameter was added. | |
json_encode | options 参数增加常量: JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, 和 JSON_UNESCAPED_UNICODE。 | |
mb_encode_numericentity | Added is_hex parameter. | |
openssl_decrypt | The raw_output was changed to options. | |
openssl_encrypt | The raw_output was changed to options. | |
scandir | sorting_order now accepts constants. Any nonzero value caused descending order in previous versions. | |
session_set_save_handler | Added SessionHandlerInterface for implementing session handlers and SessionHandler to expose internal PHP session handlers. | |
snmp_set_valueretrieval | Constants SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY may be combined with SNMP_VALUE_OBJECT resulting different way of representing contents of value array element in return value of GET-function. If no SNMP_VALUE_{PLAIN,LIBRARY} constant is accompanying SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used. Prior to 5.4.0 SNMP_VALUE_OBJECT effecively meant SNMP_VALUE_OBJECT|SNMP_VALUE_PLAIN. | |
Phar::setStub | Added len parameter. | |
PharData::setStub | Added len parameter. | |
SimpleXMLElement::getDocNamespaces | Added from_root parameter. | |
SoapClient::SoapClient | New keep_alive option. | |
5.4 | grapheme_substr | If length is given and positive and the argument string is shorter than the specified length, all the rest of the string according to start parameter is returned. Previously, FALSE was returned. |
5.3.9 | is_subclass_of | Added allow_string parameter |
5.3.6 | DateTime::modify | Absolute date/time statements now take effect. Previously, only relative parts were used. |
DOMDocument::saveHTML | The node parameter was added. | |
PDO_MYSQL DSN | Prior to version 5.3.6, charset was ignored. | |
5.3.4 | rawurlencode | 因为 rawurlencode 使用了 EBCDIC,所以波浪线字符不会再被编码。 |
IntlDateFormatter::format | Support for providing DateTime objects to the value parameter was added. | |
5.3.3 | DOMXPath::evaluate | The registerNodeNS parameter was added. |
DOMXPath::query | The registerNodeNS parameter was added. | |
json_encode | options 参数增加常量:JSON_NUMERIC_CHECK。 | |
ldap_sasl_bind | Support on Windows was added. | |
openssl_decrypt | The iv parameter was added. | |
openssl_encrypt | The iv parameter was added. | |
parse_url | 在 URL 解析失败时将不会产生 E_WARNING 级别的错误。 | |
5.3.2 | flock | 在文件资源句柄关闭时不再自动解锁。现在要解锁必须手动进行。 |
gmp_init | The base was extended from 2 to 36, to 2 to 62 and -2 to -36. | |
gmp_strval | The base was extended from 2 to 36, to 2 to 62 and -2 to -36. | |
5.3.1 | ibase_query | On success the function now returns TRUE if there were no affected rows, where it previously returned 0 (a zero followed by an empty space). |
rename | 可以在 Windows 上跨驱动器 rename 文件。 | |
5.3.0 | DateTime::__construct | If time contains an invalid date/time format, then an exception is now thrown. Previously an error was emitted. |
DateTime::modify | 将返回值从NULL改为 DateTime 类型。 | |
DateTime::setDate | 将返回值从NULL改为 DateTime 类型。 | |
DateTime::setISODate | 将返回值从NULL改为 DateTime 类型。 | |
DateTime::setTime | 将返回值从NULL改为 DateTime 类型。 | |
DateTime::setTimezone | 将返回值从NULL改为 DateTime 类型。 | |
DateTimeZone::getTransitions | The optional timestamp_begin and timestamp_end were added. | |
DateTimeZone::listIdentifiers | Added the optional what and country parameters. | |
acosh | This function is now available on all platforms | |
asinh | 此函数在所有平台上均可用 | |
atanh | 此函数在所有平台上都可以用了 | |
call_user_func | The interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static. | |
call_user_func_array | The interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static. | |
checkdnsrr | This function is now available on Windows platforms. | |
clearstatcache | 增加了可选的 clear_realpath_cache 和 filename 参数. | |
copy | 增加了对 context 的支持。 | |
date_default_timezone_set | 现在会抛出 E_WARNING 而不是 E_STRICT。 | |
define_syslog_variables | This function now throws an E_DEPRECATED notice. | |
dns_get_record | This function is now available on Windows platforms. | |
dns_get_record | Prior to this release, if the authns parameter was given, the addtl parameter was also required. | |
expm1 | 此函数在所有平台上均可用 | |
fgetcsv | 增加了 escape 参数。 | |
fnmatch | 此函数开始在 Windows 平台上生效。 | |
func_get_arg | This function can now be used in parameter lists. | |
func_get_arg | If this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns FALSE. | |
func_get_args | If this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns FALSE. | |
func_get_args | This function can now be used in parameter lists. | |
func_num_args | This function can now be used in parameter lists. | |
func_num_args | If this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns -1. | |
get_object_vars | This function now returns NULL if the object isn't an object. | |
getimagesize | Added icon support. | |
getmxrr | This function is now available on Windows platforms. | |
hash_algos | Support for md2, ripemd256, ripemd320, salsa10, salsa20, snefru256 and sha224 was added | |
imagecolorclosesthwb | 在 Windows 平台上可用 | |
imagefilter | Pixelation support (IMG_FILTER_PIXELATE) was added. | |
inet_ntop | This function is now available on Windows platforms. | |
inet_pton | This function is now available on Windows platforms. | |
json_decode | Added the optional depth. The default recursion depth was increased from 128 to 512 | |
json_encode | 增加 options 参数. | |
link | 该功能在 Windows 平台下开始有效(Vista、 Server 2008 或更高版本)。 | |
linkinfo | Windows 平台上开始可用(Vista、Server 2008 或更高版本)。 | |
log1p | 此函数在所有平台上均可用 | |
mb_get_info | 条目 "http_output_conv_mimetypes" 开始有效。 | |
mcrypt_create_iv | MCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM became available on Windows platforms. | |
mcrypt_create_iv | It is no longer required to call srand first. This is now done automatically. | |
mktime | mktime now throws E_DEPRECATED notice if the is_dst parameter is used. | |
parse_ini_file | Added optional scanner_mode parameter. Single quotes may now be used around variable assignments. Hash marks (#) may no longer be used as comments and will throw a deprecation warning if used. | |
pg_lo_import | The optional object_id was added. | |
property_exists | This function checks the existence of a property independent of accessibility. | |
rawurlencode | 现在符合了RFC 3986。 | |
readlink | 此函数在 Windows 平台下可用(Vista、Server 2008 或更高版本)。 | |
realpath | 在之前的版本中,在 *BSD 系统上,如果仅仅是 path 不存在的话,realpath 并不会像其它系统那样返回 FALSE。 | |
register_tick_function | Ticks are now supported on threaded web server modules. | |
round | 引入了 mode 参数 | |
session_start | If a session fails to start, then FALSE is returned. Previously TRUE was returned. | |
shm_attach | This function now returns a 资源(resource) instead of an integer. | |
socket_create_pair | This function is now re-enabled on Windows platforms. | |
stream_context_create | Added the optional params argument. | |
stream_socket_pair | 这个函数在windows平台不可用 | |
strtotime | 在 PHP 5.3.0 之前, 24:00 不是一个有效的格式,并且 strtotime 会返回 FALSE。 | |
sybase_connect | The new parameter was added. | |
symlink | 此函数在 Windows 平台上可用(Vista、Server 2008 或更高版本)。 | |
touch | 能够修改 Windows 下目录的最后修改时间。 | |
ReflectionFunction::__construct | name can now be a closure. | |
5.2.10 | ip2long | Prior to this version, ip2long would sometimes return a valid number even if passed an value which was not an (IPv4) Internet Protocol dotted address. |
5.2.8 | XSLTProcessor::importStylesheet | Accepts SimpleXMLElement again which was broken since PHP 5.2.6. |
5.2.7 | parse_ini_file | On syntax error this function will return FALSE rather than an empty array. |
round | round 的内部运作修改符合 C99 的标准。 | |
strtotime | In PHP 5 prior to 5.2.7, requesting a given occurrence of a given weekday in a month where that weekday was the first day of the month would incorrectly add one week to the returned timestamp. This has been corrected in 5.2.7 and later versions. | |
5.2.6 | fopen | 增加了选项 'c' 和 'c+' |
5.2.5 | imagefilter | Alpha support for IMG_FILTER_COLORIZE was added. |
5.2.4 | checkdnsrr | TXT type was added. |
ldap_first_attribute | The ber_identifier was removed. This is now handled automatically by PHP. | |
ldap_next_attribute | The ber_identifier was removed. This is now handled automatically by PHP. | |
parse_ini_file | 由数字组成的键名和小节名会被 PHP 当作整数来处理,因此以 0 开头的数字会被当作八进制而以 0x 开头的会被当作十六进制。 | |
5.2.3 | getimagesize | Read errors generated by this function downgraded to E_NOTICE from E_WARNING. |
json_decode | The nesting limit was increased from 20 to 128 | |
XMLWriter::writeElement | The content parameter became optional. | |
XMLWriter::writeElementNS | The content parameter became optional. | |
PDOStatement::getColumnMeta | table 字段 | |
5.2.2 | DOMDocument::registerNodeClass | Prior to 5.2.2, a previously registered extendedclass had to be unregistered before being able to register a new class extending the same baseclass. |
ftp_ssl_connect | The function was changed to return FALSE when it can't use an SSL connection, instead of fallbacking to a non-SSL one as previously. | |
proc_terminate | Previous versions used to destroy the given process resource. | |
token_get_all | Line numbers are returned in element 2 | |
5.2.1 | json_decode | Added support for JSON decoding of basic types. |
mt_srand | The Mersenne Twister implementation in PHP now uses a new seeding algorithm by Richard Wagner. Identical seeds no longer produce the same sequence of values they did in previous versions. This behavior is not expected to change again, but it is considered unsafe to rely upon it nonetheless. | |
proc_open | Added the bypass_shell option to the other_options parameter. | |
5.2.0 | base64_decode | 增加了 strict 。 |
imagettftext | It is now possible to specify an hexadecimal entity in text. | |
mb_strrpos | 增加了可选参数 offset。 | |
openssl_verify | The signature_alg parameter was added. | |
pathinfo | 添加了常量 PATHINFO_FILENAME。 | |
session_get_cookie_params | The "httponly" entry was added in the returned array. | |
session_set_cookie_params | The httponly parameter was added. | |
setcookie | The httponly parameter was added. | |
setrawcookie | The httponly parameter was added. | |
snmp_set_oid_numeric_print | Since PHP 5.2.0. | |
PDOStatement::execute | input_parameters 中的键名必须和 SQL 中声明的相匹配。PHP 5.2.0 之前默认忽略。 | |
SimpleXMLElement::children | The optional parameter is_prefix was added. | |
SimpleXMLElement::__construct | Added the ns and is_prefix parameters. | |
SoapServer::SoapServer | Added the typemap option. | |
XMLReader::open | encoding and options were added. | |
XMLReader::XML | encoding and options were added. | |
5.1.3 | get_headers | 自 PHP 5.1.3 起本函数使用默认的流上下文,其可以用 stream_context_get_default 函数设定和修改。 |
http_build_query | 方括号也会被转义。 | |
mb_get_info | 实体 "mail_charset"、"mail_header_encoding" 和 "mail_body_encoding" 开始有效。 | |
SoapClient::__doRequest | The one_way parameter was added. | |
XMLReader::getAttribute | Return NULL if no attribute found. Previously, returned an empty string. | |
5.1.2 | date_default_timezone_set | 本版本开始验证 timezone_identifier 参数。 |
http_build_query | 加入了参数 arg_separator。 | |
parse_url | 增加了参数 component。 | |
SimpleXMLElement::__construct | Added the options and data_is_url parameters. | |
5.1.1 | date | There are useful constants of standard date/time formats that can be used to specify the format parameter. |
5.1.0 | DOMDocument::save | Added the options parameter |
DOMDocument::saveXML | Added the options parameter | |
ctype_digit | Before PHP 5.1.0, this function returned TRUE when text was an empty string. | |
date | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
date | The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer). However, before PHP 5.1.0 this range was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows). | |
date_sunrise | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
date_sunset | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
file_get_contents | Added the offset and maxlen parameters. | |
file_put_contents | 添加了对 LOCK_EX 的支持和 data 参数处理 stream 资源的功能。 | |
gettimeofday | 增加了参数 return_float。 | |
glob | GLOB_ERR was added | |
imagerotate | 新增: ignore_transparent 。 | |
localtime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
mktime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
mktime | When called with no arguments, mktime throws E_STRICT notice. Use the time function instead. | |
mktime | is_dst 参数被废弃。出错时函数返回 FALSE 而不再是 -1。修正了本函数可以接受年月日参数全为零。 | |
openssl_pkcs7_verify | The content parameter was added. | |
session_regenerate_id | Added the delete_old_session parameter. | |
stream_copy_to_stream | Added the offset parameter | |
stream_filter_append | Prior to PHP 5.1.0, this function returns TRUE on success 或者在失败时返回 FALSE. | |
stream_filter_prepend | Prior to PHP 5.1.0, this function returns TRUE on success 或者在失败时返回 FALSE. | |
stream_get_contents | The offset was added. | |
strftime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
strtotime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
strtotime | 失败时返回 FALSE,不再是 -1。 | |
XSLTProcessor::registerPHPFunctions | The restrict parameter was added. | |
5.0.3 | get_class_vars | Depending on the scope, get_class_vars will only return the properties that can be accessed from the current scope. |
is_subclass_of | You may also specify the object parameter as a string (the name of the class) | |
5.0.2 | class_exists | 不再为已定义的 interface 返回 TRUE。请使用 interface_exists。 |
get_class_vars | Calling get_class_vars will now expose all the properties as an array, unlike previous behaviour where protected and private properties were prefixed with nul bytes. | |
strtotime | 在 PHP 5 中到 5.0.2 之前,"now" 和其它相对时间从今天午夜起错误计算了。这和正确从当前时间起计算的其它版本不同。 | |
5.0.1 | get_class_vars | Calling get_class_vars will expose all properties, as when converting an object to a class. |
5.0.0 | apache_get_modules | Became available when using Apache 1, or the PHP Apache 2 filter API. Before this time, it was only available when using the Apache 2 handler API. |
apache_get_version | Became available with the Apache 2 filter API. | |
checkdnsrr | AAAA type was added. | |
class_exists | 增加参数 autoload。 | |
dirname | dirname 的操作从 PHP 5.0.0 版开始是二进制安全的。 | |
empty | Objects with no properties are no longer considered empty. | |
fgetss | 参数 length 从 此开始可选。 | |
file | 增加了参数 context | |
file | Prior to PHP 5.0.0 the flags parameter only covered include_path and was enabled with 1 | |
file_get_contents | Added context support. | |
file_put_contents | Added context support | |
get_class_methods | 自 PHP 5 起,本函数按照方法被定义的名字返回(区分大小写)。在 PHP 4 中总是返回小写的。 | |
ip2long | Prior to this version, ip2long returned -1 on failure. | |
is_executable | is_executable 开始可用以于 Windows。 | |
mb_encode_mimeheader | 增加了 indent 参数。 | |
mb_send_mail | 自 PHP 5.0.0 起可以重新定义 Content-Type 和 Content-Transfer-Encoding 头。 在此之前,总是使用 mb_language 定义的值。 | |
mkdir | mkdir 也可用于某些 URL 封装协议。参见 的列表看看 mkdir 支持哪些 URL 封装协议。 | |
mkdir | 添加 recursive 参数。 | |
mysql_fetch_object | Added the ability to return as a different object. | |
opendir | path 支持 ftp:// URL wrapper | |
openssl_pkcs7_encrypt | The cipherid parameter was added. | |
openssl_sign | The signature_alg parameter was added. | |
parse_ini_file | 该函数也开始处理选项值内的新行。 | |
proc_open | Added the cwd, env and other_options parameters. | |
realpath | 在此之前的版本中,如果 path 传入了空或者 NULL,将导致 realpath 返回脚本当前的目录。 | |
rename | rename 也可用于某些 URL 封装协议。参见 的列表看看 rename 支持哪些 URL 封装协议。 | |
rmdir | 自 PHP 5.0.0 起 rmdir 也可用于某些 URL 封装协议。参见 的列表看看 rmdir 支持哪些 URL 封装协议。 | |
session_id | The , (comma) and - (minus) characters are allowed in the file session handler. | |
socket_create | 增加 AF_INET6 支持。 | |
strtotime | Microseconds began to be allowed, but they are ignored. | |
unlink | 自 PHP 5.0.0 起 unlink 也可以用于某些 URL 封装协议。参考 中的列表看哪些封装协议支持 unlink。 |