对绑定的扩展的函数有以下更新。
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 object parameter is optional if called from the object's method. |
get_class | The class name is returned in its original notation. | |
get_parent_class | The object parameter is optional if called from the object's method. | |
Since 5.0 | cal_info | 参数calendar作为可选项,缺省时默认值为"所有历法"。 |
Since 4.3.0 | easter_date | year参数可选,缺省的默认值是当年。 |
easter_days | 参数year 可选,缺省默认值是当年。 | |
easter_days | 引入参数 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 7.1.0 | mb_ereg | mb_ereg will now set regs to an empty array, if nothing matched. Formerly, regs was not modified in that case. |
mb_eregi | mb_eregi will now set regs to an empty array, if nothing matched. Formerly, regs was not modified in that case. | |
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. |
7.1.0 | mb_ereg_replace | The e modifier has been deprecated. |
mb_eregi_replace | The e modifier has been deprecated. | |
7.0.0 | assert | assert is now a language construct and not a function. assertion can now be an expression. The second parameter is now interpreted either as an exception (if a Throwable object is given), or as the description supported from PHP 5.4.8 onwards. |
session_start | 新加 options 参数。 | |
substr | 如果 string 的字符串长度与 start 相同时将返回一个空字符串。在之前的版本中,这种情况将返回 FALSE 。 | |
IntlDateFormatter::setTimeZoneId | This function has been removed. | |
5.6.6 | json_encode | options 参数增加常量: JSON_PRESERVE_ZERO_FRACTION |
5.6.5 | crypt | When the failure string "*0" is given as the salt, "*1" will now be returned for consistency with other crypt implementations. Prior to this version, PHP 5.6 would incorrectly return a DES hash. |
5.6.1 | sem_acquire | The $nowait parameter was added. |
5.6.0 | crypt | Raise E_NOTICE security warning if salt is omitted. |
curl_setopt | 移出 CURLOPT_CLOSEPOLICY和相关的值。 | |
curl_setopt | 默认 CURLOPT_SAFE_UPLOAD为 TRUE 。 | |
hash_algos | 加入对 gost-crypto 算法的支持。 参照 RFC 4357,11.2 小节 定义的 CryptoPro S-box 表格实现 GOST 哈希函数。 | |
html_entity_decode | The default value for the encoding parameter was changed to be the value of the default_charset configuration option. | |
htmlentities | The default value for the encoding parameter was changed to be the value of the default_charset configuration option. | |
htmlspecialchars | The default value for the encoding parameter was changed to be the value of the default_charset configuration option. | |
json_decode | Invalid non-lowercased variants of the true, false and null literals are no longer accepted as valid input, and will generate warnings. | |
mb_regex_encoding | Default encoding is changed to UTF-8. It was EUC-JP Previously. | |
mcrypt_create_iv | source 参数的默认值是 MCRYPT_DEV_URANDOM。 | |
mcrypt_decrypt | 不再接受无效长度的 key and iv 参数。 如果参数长度无效,则 mcrypt_decrypt 函数会产生警告并且返回 FALSE。 之前版本中,对于长度不足的密钥和初始向量会在其后补齐 '\0' 使其达到有效长度。 | |
mcrypt_encrypt | 不再接受无效长度的 key and iv 参数。 如果参数长度无效,则 mcrypt_decrypt 函数会产生警告并且返回 FALSE。 之前版本中,对于长度不足的密钥和初始向量会在其后补齐 '\0' 使其达到有效长度。 | |
pg_lo_truncate | Added truncate function. It supports PostgreSQL 9.3's 64bit large object. Both client and server must support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object. | |
stream_socket_enable_crypto | The crypto_type is now optional. | |
substr_compare | length 可以是 0。 | |
ReflectionClass::newInstanceWithoutConstructor | All internal classes can now be instantiated except for those declared final. | |
XMLReader::getAttributeNo | XMLReader::getAttributeNo now returns NULL if the attribute doesn't exist. | |
XMLReader::getAttributeNs | XMLReader::getAttributeNS now returns NULL if the attribute doesn't exist. | |
5.5.21 | crypt | When the failure string "*0" is given as the salt, "*1" will now be returned for consistency with other crypt implementations. Prior to this version, PHP 5.5 (and earlier branches) would incorrectly return a DES hash. |
5.5.19/5.6.3 | imagescale | The calculation of the height if new_height was negative or omitted was fixed; prior to these versions, the aspect ratio was not maintained correctly. |
5.5.8 | DatePeriod::__construct | end type changed to DateTimeImmutable. Previously, DateTime. |
5.5.7 | apache_request_headers | 此函数可用于 CLI server。 |
apache_response_headers | 此函数可用于 CLI server. | |
getallheaders | 此函数可用于 CLI server。 | |
5.5.2 | DOMDocument::schemaValidate | Added the flags parameter |
DOMDocument::schemaValidateSource | Added the flags parameter | |
5.5.1 | hex2bin | 如果输入的字符串是无效的十六进制字符串则抛出一个警告, |
session_set_save_handler | 加入可选参数 create_sid。 | |
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 | DatePeriod::__construct | start type changed to DateTimeImmutable. Previously, DateTime. |
curl_setopt | 引入 CURLOPT_SHARE。 | |
curl_setopt | 添加 cURL 资源作为 CURLOPT_PROGRESSFUNCTION 回调函数的第一个参数。 | |
empty | empty 现在支持表达式了,而不仅仅是变量。 | |
json_encode | 增加 depth 参数。 | |
php_logo_guid | php_logo_guid 从 PHP 中移除。 | |
preg_replace | /e 修饰符已经被弃用了。使用 preg_replace_callback 代替。参见文档中 PREG_REPLACE_EVAL 关于安全风险的更多信息。 | |
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. | |
zend_logo_guid | zend_logo_guid 从 PHP 中移除了。 | |
IntlDateFormatter::setTimeZoneId | This function has been deprecated. | |
SoapClient::SoapClient | New ssl_method option. | |
5.4.8 | assert | 增加了参数 description。 description 现在也作为第四个参数提供给 ASSERT_CALLBACK 模式里的回调函数。 |
5.4.7 | parse_url | 修复了 host 在 协议 省略时的识别。 |
5.4.4 | hex2bin | 如果输入的字符串有多余将抛出异常。 PHP 5.4.0 起字符串将被静默地接受,但是最后的字节会被截断。 |
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 | 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。 | |
apache_response_headers | 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。 | |
array_combine | (修复)早期版本中如果是空数组就报E_WARNING的错并且返回FALSE。 | |
date_default_timezone_get | 不再根据操作系统的信息来推测时区,因为这是不可靠的。 | |
date_default_timezone_get | 不再使用 TZ 来推测时区。 | |
define_syslog_variables | This function was removed from PHP. | |
dns_get_record | 增加了参数raw。 | |
empty | 检查非数字的字符串偏移量会返回 TRUE. | |
filter_input_array | 添加 add_empty 参数. | |
filter_var_array | 添加 add_empty 参数. | |
get_html_translation_table | The default value for the encoding parameter was changed to UTF-8. | |
get_html_translation_table | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
get_magic_quotes_gpc | 始终返回 FALSE,因为这个魔术引号功能已经从 PHP 中移除了。 | |
get_magic_quotes_runtime | 总是返回 FALSE,因为魔术引号(magic quotes)功能已经从 PHP 中移除。 | |
getallheaders | 此函数可用于 FastCGI。 此前仅在PHP以 Apache 模块方式运行时支持。 | |
gzcompress | Added encoding parameter. | |
gzdeflate | Added encoding parameter. | |
gzencode | FORCE_DEFLATE now generates RFC 1950 compliant output. | |
hash | tiger 算法使用大端(big-endian)字节序。参见下面的示例。 | |
hash_algos | 加入对于 joaat,fnv132 和 fnv164 算法的支持。移除 Salsa10 和 Salsa20 算法。 | |
html_entity_decode | Default encoding changed from ISO-8859-1 to UTF-8. | |
html_entity_decode | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlentities | The constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlentities | The default value for the encoding parameter was changed to UTF-8. | |
htmlspecialchars | The constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlspecialchars | The default value for the encoding parameter was changed to UTF-8. | |
htmlspecialchars_decode | 增加了 ENT_HTML401、ENT_XML1、 ENT_XHTML 和 ENT_HTML5 等常量。 | |
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. | |
number_format | This function now supports multiple bytes in dec_point and thousands_sep. Only the first byte of each separator was used in older versions. | |
openssl_decrypt | The raw_output was changed to options. | |
openssl_encrypt | The raw_output was changed to options. | |
preg_match_all | 参数matches成为可选的。 | |
scandir | sorting_order now accepts constants. Any nonzero value caused descending order in previous versions. | |
session_set_save_handler | 加入 SessionHandlerInterface 接口以及 SessionHandler 类,以方便用户实现自定义的会话保存管理器。 | |
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. | |
sort | 添加了 sort_flags 内 SORT_NATURAL 和 SORT_FLAG_CASE 的支持。 | |
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 | DateTime::createFromFormat | The + format specifier has been added. |
is_a | Added allow_string parameter | |
is_subclass_of | Added allow_string parameter | |
5.3.7 | crypt | Added $2x$ and $2y$ Blowfish modes to deal with potential high-bit attacks. |
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. | |
preg_match | 如果 offset 比 subject 的长度还要大则返回 FALSE。 | |
preg_match_all | 如果 offset 大于 subject 的程度,将返回 FALSE。 | |
PDO_MYSQL DSN | Prior to version 5.3.6, charset was ignored. | |
5.3.4 | get_html_translation_table | The encoding parameter was added. |
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 | crypt | 基于 Ulrich Drepper 的实现,新增基于 SHA-256 算法和 SHA-512 算法的 crypt。 |
crypt | 修正了 Blowfish 算法由于非法循环导致的问题,返回“失败”字符串(“*0” 或 “*1”)而不是转而使用 DES 算法。 | |
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 | get_defined_constants | 仅作用于 Windows:内核常量归类到 Core,之前是 mhash。 |
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 | |
array_reduce | Changed initial to allow mixed, previously integer. | |
array_search | As with all internal PHP functions as of 5.3.0, array_search returns NULL if invalid parameters are passed to it. | |
asinh | 此函数在所有平台上均可用 | |
atanh | 此函数在所有平台上都可以用了 | |
call_user_func | 对面向对象里面的关键字的解析有所增强。在此之前,使用双引号来来连接一个类和里面的一个方法,把之作为参数来作为回调函数的会,将会发出一个E_STRICT的警告,因为这个传入的参数被视为静态方法。 | |
call_user_func_array | 对面向对象里面的关键字的解析有所增强。在此之前,使用双引号来来连接一个类和里面的一个方法,把之作为参数来作为回调函数的会,将会发出一个E_STRICT的警告,因为这个传入的参数被视为静态方法。 | |
checkdnsrr | 这个函数在Windows平台上也可以使用了。 | |
clearstatcache | 增加了可选的 clear_realpath_cache 和 filename 参数. | |
copy | 增加了对 context 的支持。 | |
crypt | PHP 现在包含了它自己的 MD5 Crypt 实现,包括标准 DES 算法,扩展的 DES 算法以及 Blowfish 算法。如果系统缺乏相应的实现,那么 PHP 将使用它自己的实现。 | |
curl_setopt | 引入 CURLOPT_PROGRESSFUNCTION。 | |
date_default_timezone_set | 现在会抛出 E_WARNING 而不是 E_STRICT。 | |
define_syslog_variables | This function now throws an E_DEPRECATED notice. | |
dl | 由于稳定性,dl 在某些 SAPI 中被禁用。仅仅允许 dl 的 SAPI 为 CLI 和 Embed。 使用 扩展加载指令 作为替代。 | |
dns_get_record | 在此版本之前,如果给参数authns传入值,则必须同时传入addtl的值。 | |
dns_get_record | 可以是在windows平台上使用这个函数了。 | |
expm1 | 此函数在所有平台上均可用 | |
fgetcsv | 增加了 escape 参数。 | |
fnmatch | 此函数开始在 Windows 平台上生效。 | |
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. (不知道如何翻译跟好,直接参考例2即可明白) | |
func_get_arg | 该函数可以在参数列表中使用。 | |
func_get_args | 该函数可以在参数列表中使用。 | |
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. (不知道如何翻译跟好,直接参考例2即可明白) | |
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_cfg_var | get_cfg_var 被修复,能够返回 "array" 的 ini 选项。 | |
get_defined_constants | 内核常量归类为 Core,之前是 internal。在 Windows 上,内核常量归类到 mhash。 | |
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. | |
getopt | 增加了可选值的支持(用"::"指定)。 | |
getopt | 支持 "=" 作为 参数和值的分隔符。 | |
getopt | 参数 longopts 在所有系统平台上均可用。 | |
getopt | 此函数不再依赖于操作系统,现在也能够在 Windows 上运行。 | |
hash_algos | 加入对 md2,ripemd256,ripemd320,salsa10,salsa20,snefru256 和 sha224 哈希算法的支持。 | |
htmlentities | The constant ENT_IGNORE was added. | |
htmlspecialchars | The constant ENT_IGNORE 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. | |
ini_get | 当配置项不存在,之前会返回空字符串,现在会返回 FALSE。 | |
ini_get_all | 增加参数 details。 | |
is_a | This function is no longer deprecated, and will therefore no longer throw E_STRICT warnings. | |
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 | 不再需要提前调用 srand 函数, 由本函数自动完成调用。 | |
mcrypt_create_iv | MCRYPT_DEV_RANDOM 和 MCRYPT_DEV_URANDOM 在 Windows 平台也可用了。 | |
mktime | mktime now throws E_DEPRECATED notice if the is_dst parameter is used. | |
nl2br | 新增可选的 is_xhtml 参数。 | |
openssl_seal | The method parameter was added. | |
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. | |
preg_quote | 字符 - 被增加为需要转义的。 | |
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 | 如果函数调用失败返回 FALSE, 之前版本返回了 TRUE。 | |
setlocale | This function now throws an E_DEPRECATED notice if a string is passed to the category parameter instead of one of the LC_* constants. | |
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 | 增加了可选参数 params 。 | |
stream_socket_pair | 这个函数在windows平台不可用 | |
stristr | 新增可选的 before_needle 参数。 | |
strlen | Prior versions treated arrays as the string Array, thus returning a string length of 5 and emitting an E_NOTICE level error. | |
strstr | 新增可选的 before_needle 参数。 | |
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. | |
XMLReader::expand | The parameter basenode was added. | |
5.2.11 | get_defined_constants | categorize 参数现在可以合适得被处理。 在此之前,categorize 被解释为 !is_null($categorize),导致任何非 NULL 的值会强制常量分类。 |
5.2.10 | array_rand | The resulting array of keys is no longer shuffled. |
array_unique | Changed the default value of sort_flags back to SORT_STRING. | |
curl_setopt | 引入 CURLOPT_PROTOCOLS, and CURLOPT_REDIR_PROTOCOLS. | |
ip2long | 再此之前的版本, ip2long 有时会返回即使这不是一个IPV4的标准地址的数字地址。 | |
natsort | Zero padded numeric strings (e.g., '00005') now essentially ignore the 0 padding. | |
5.2.9 | array_unique | Added the optional sort_flags defaulting to SORT_REGULAR. Prior to 5.2.9, this function used to sort the array with SORT_STRING internally. |
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 | addcslashes | The escape sequences \v and \f were added. |
imagefilter | Alpha support for IMG_FILTER_COLORIZE was added. | |
5.2.4 | checkdnsrr | 增加了TXT的记录类型。 |
curl_setopt | 引入了 CURLOPT_PRIVATE。 | |
get_loaded_extensions | 添加了可选的 zend_extensions 参数。 | |
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 开头的会被当作十六进制。 | |
stream_wrapper_register | 添加 flags 参数. | |
5.2.3 | getimagesize | Read errors generated by this function downgraded to E_NOTICE from E_WARNING. |
htmlentities | The double_encode parameter was added. | |
htmlspecialchars | The double_encode parameter was added. | |
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 - 5.2.6 | substr | If the start parameter indicates the position of a negative truncation or beyond, false is returned. Other versions get the string from start. |
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 | 以前版本中,如果无法使用 SSL 连接,将会返回一个非 SSL 的连接, 在 5.2.2 版本中修改为返回 FALSE | |
phpinfo | 增加了“已加载的配置文件”信息,之前只存在“配置文件路径(php.ini)"。 | |
preg_match | 命名子组可以接受(?<name>), (?'name') 以及(?P<name>)语法。之前版本仅接受(?P<name>)语法。 | |
preg_match_all | 子命名分组语法可以接受(?<name>),(?'name')以及 (?P<name>)了。 之前版本仅接受(?P<name>)方式。 | |
proc_terminate | 之前的版本被用来销毁进程 resource。 | |
token_get_all | Line numbers are returned in element 2 | |
5.2.1 | json_decode | Added support for JSON decoding of basic types. |
memory_get_peak_usage | 使用此函数无需在编译时加上 --enable-memory-limit 选项。 | |
memory_get_usage | 不需要在编译时使用 --enable-memory-limit 选项就能够使用这个函数。 | |
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 | 为 other_options 参数增加 bypass_shell 选项。 | |
5.2.0 | base64_decode | 增加了 strict 。 |
curl_multi_info_read | msgs_in_queue被加入。 | |
imagettftext | It is now possible to specify an hexadecimal entity in text. | |
mb_strrpos | 增加了可选参数 offset。 | |
memory_get_peak_usage | 添加参数 real_usage。 | |
memory_get_usage | 增加了参数 real_usage。 | |
openssl_verify | The signature_alg parameter was added. | |
pathinfo | 添加了常量 PATHINFO_FILENAME。 | |
session_get_cookie_params | 在返回数组中加入 “httponly”。 | |
session_set_cookie_params | 加入 httponly 参数。 | |
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 | curl_getinfo | 引入CURLINFO_HEADER_OUT. |
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 参数。 |
header | 这个函数现在可以一次性阻止多个报文信息的发送,从而作为对报文信息注入攻击的一种防护。 | |
http_build_query | 加入了参数 arg_separator。 | |
parse_url | 增加了参数 component。 | |
SimpleXMLElement::__construct | Added the options and data_is_url parameters. | |
5.1.1 | date | format 参数标准的可用日期/时间格式常量见: 常量 |
5.1.0 | DOMDocument::save | Added the options parameter |
DOMDocument::saveXML | Added the options parameter | |
ctype_digit | 在 PHP 5.1.0 之前,当 text 是一个空字符串的时候,该函数将返回 TRUE 。 | |
curl_setopt | 引入 CURLOPT_AUTOREFERER, CURLOPT_BINARYTRANSFER, CURLOPT_FTPSSLAUTH, CURLOPT_PROXYAUTH, and CURLOPT_TIMECONDITION. | |
date | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
date | 时间戳的有效取值范围为 GMT 时间的 1901 年 12 月 13 日至 GMT 时间的 2038 年 1 月 19 日。 (32 位有符号整数的取值范围)。 但是,在 PHP 5.1.0 之前的版本,在某些系统(例如 Windows)上有效取值范围为 1970 年 1 月 1 日至 2038 年 1 月 19 日。 | |
date_sunrise | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
date_sunset | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
explode | 支持负数的 limit | |
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 。 | |
intval | 当传入的 var 是 object,将会抛出 E_NOTICE 并返回 1。 | |
localtime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
md5_file | 函数改用流 API。这意味着能够配合封装器使用该函数,比如 md5_file('http://example.com/..')。 | |
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。修正了本函数可以接受年月日参数全为零。 | |
mssql_connect | new_link参数加入 | |
openssl_pkcs7_verify | The content parameter was added. | |
preg_replace | 增加参数count. | |
preg_replace_callback | 增加了参数count。 | |
session_regenerate_id | 加入 delete_old_session 参数。 | |
sha1_file | 改变函数以使用流 API。这意味着可以使用包装器,比如 sha1_file('http://example.com/..')。 | |
str_word_count | 新增 charlist 参数。 | |
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 | 增加参数 offset 。 | |
strftime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
strtotime | 失败时返回 FALSE,不再是 -1。 | |
strtotime | 现在发布 E_STRICT 和 E_NOTICE 时区错误。 | |
substr_compare | 允许使用负数的 offset 参数。 | |
substr_count | 新增 offset 和 length 参数。 | |
XSLTProcessor::registerPHPFunctions | The restrict parameter was added. | |
5.0.4 | msql_fetch_array | A bug was fixed when retrieving data from columns containing NULL values. Such columns were not placed into the resulting array. |
msql_fetch_object | A bug was fixed when retrieving data from columns containing NULL values. Such columns were not placed into the resulting array. | |
msql_fetch_row | A bug was fixed when retrieving data from columns containing NULL values. Such columns were not placed into the resulting array. | |
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 | array_slice | 增加了可选参数 preserve_keys 。 |
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. | |
sort | 添加了 SORT_LOCALE_STRING。 | |
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 | 可用于Apache 1或PHP Apache 2 filter API。 在此之前, 只可用于 Apache 2 handler API。 |
apache_get_version | 可用于 Apache 2 filter API. | |
array_merge | array_merge 的行为在 PHP 5 中被修改了。和 PHP 4 不同,array_merge 现在只接受 array 类型的参数。不过可以用强制转换来合并其它类型。请看下面的例子。 array_merge PHP 5 例子 <?php $beginning = 'foo'; $end = array(1 => 'bar'); $result = array_merge((array)$beginning, (array)$end); print_r($result); ?> 以上例程会输出: Array ( [0] => foo [1] => bar ) | |
checkdnsrr | 增加了AAAA的记录类型。 | |
class_exists | 增加参数 autoload。 | |
curl_setopt | 引入 CURLOPT_FTP_USE_EPRT, CURLOPT_NOSIGNAL, CURLOPT_UNRESTRICTED_AUTH, CURLOPT_BUFFERSIZE, CURLOPT_HTTPAUTH, CURLOPT_PROXYPORT, CURLOPT_PROXYTYPE, CURLOPT_SSLCERTTYPE, and CURLOPT_HTTP200ALIASES. | |
dirname | dirname 的操作从 PHP 5.0.0 版开始是二进制安全的。 | |
extension_loaded | extension_loaded 使用内置扩展名称来测试一个扩展是否有效。 大多数内置扩展名称是小写的,但也有扩展使用大写字符。 在 PHP 5 之前,此函数以大小写敏感的方式对比名称。 | |
fgetss | 参数 length 从 此开始可选。 | |
file | Prior to PHP 5.0.0 the flags parameter only covered include_path and was enabled with 1 | |
file | 增加了参数 context | |
file_get_contents | Added context support. | |
file_put_contents | Added context support | |
get_class_methods | 自 PHP 5 起,本函数按照方法被定义的名字返回(区分大小写)。在 PHP 4 中总是返回小写的。 | |
get_defined_constants | 增加了参数 categorize。 | |
is_a | This function became deprecated in favour of the instanceof operator. Calling this function will result in an E_STRICT warning. | |
is_executable | is_executable 开始可用以于 Windows。 | |
jdtojewish | 增加了参数 fl。 | |
md5 | 新增 raw_output 参数。 | |
mkdir | 添加 recursive 参数。 | |
mkdir | mkdir 也可用于某些 URL 封装协议。参见 的列表看看 mkdir 支持哪些 URL 封装协议。 | |
mysql_fetch_object | Added the ability to return as a different object. | |
opendir | path 支持 ftp:// URL wrapper | |
parse_ini_file | 该函数也开始处理选项值内的新行。 | |
range | 添加了可选参数 step。 | |
realpath | 在此之前的版本中,如果 path 传入了空或者 NULL,将导致 realpath 返回脚本当前的目录。 | |
rename | rename 也可用于某些 URL 封装协议。参见 的列表看看 rename 支持哪些 URL 封装协议。 | |
rmdir | 自 PHP 5.0.0 起 rmdir 也可用于某些 URL 封装协议。参见 的列表看看 rmdir 支持哪些 URL 封装协议。 | |
sha1 | 新增 raw_output 参数。 | |
socket_create | 增加 AF_INET6 支持。 | |
strip_tags | strip_tags 变为二进制安全的。 | |
strrpos | 引入 offset 参数。 | |
strrpos | 参数 needle 可以是一个多字符的字符串。 | |
strtotime | Microseconds began to be allowed, but they are ignored. | |
unlink | 自 PHP 5.0.0 起 unlink 也可以用于某些 URL 封装协议。参考 中的列表看哪些封装协议支持 unlink。 |