©
本文檔使用 php中文網手册 發布
对本扩展的类/函数/方法有以下更新。
Version | Function | Description |
---|---|---|
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.0 | crypt | Raise E_NOTICE security warning if salt is omitted. |
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. | |
substr_compare | length 可以是 0。 | |
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.1 | hex2bin | 如果输入的字符串是无效的十六进制字符串则抛出一个警告, |
5.4.4 | hex2bin | 如果输入的字符串有多余将抛出异常。 PHP 5.4.0 起字符串将被静默地接受,但是最后的字节会被截断。 |
5.4.0 | 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. | |
html_entity_decode | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
html_entity_decode | Default encoding changed from ISO-8859-1 to UTF-8. | |
htmlentities | The default value for the encoding parameter was changed to UTF-8. | |
htmlentities | 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 | The constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlspecialchars_decode | 增加了 ENT_HTML401、ENT_XML1、 ENT_XHTML 和 ENT_HTML5 等常量。 | |
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. | |
5.3.7 | crypt | Added $2x$ and $2y$ Blowfish modes to deal with potential high-bit attacks. |
5.3.4 | get_html_translation_table | The encoding parameter was added. |
5.3.2 | crypt | 基于 Ulrich Drepper 的实现,新增基于 SHA-256 算法和 SHA-512 算法的 crypt。 |
crypt | 修正了 Blowfish 算法由于非法循环导致的问题,返回“失败”字符串(“*0” 或 “*1”)而不是转而使用 DES 算法。 | |
5.3.0 | crypt | PHP 现在包含了它自己的 MD5 Crypt 实现,包括标准 DES 算法,扩展的 DES 算法以及 Blowfish 算法。如果系统缺乏相应的实现,那么 PHP 将使用它自己的实现。 |
htmlentities | The constant ENT_IGNORE was added. | |
htmlspecialchars | The constant ENT_IGNORE was added. | |
nl2br | 新增可选的 is_xhtml 参数。 | |
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. | |
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 参数。 | |
5.2.5 | addcslashes | The escape sequences \v and \f were added. |
5.2.3 | htmlentities | The double_encode parameter was added. |
htmlspecialchars | The double_encode parameter was added. | |
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.1.0 | explode | 支持负数的 limit |
md5_file | 函数改用流 API。这意味着能够配合封装器使用该函数,比如 md5_file('http://example.com/..')。 | |
sha1_file | 改变函数以使用流 API。这意味着可以使用包装器,比如 sha1_file('http://example.com/..')。 | |
str_word_count | 新增 charlist 参数。 | |
substr_compare | 允许使用负数的 offset 参数。 | |
substr_count | 新增 offset 和 length 参数。 | |
5.0.0 | md5 | 新增 raw_output 参数。 |
sha1 | 新增 raw_output 参数。 | |
strip_tags | strip_tags 变为二进制安全的。 | |
strrpos | 引入 offset 参数。 | |
strrpos | 参数 needle 可以是一个多字符的字符串。 | |
4.3.3 | substr_replace | All parameters now accept arrays. |
4.3.0 | stristr | stristr 变为二进制安全的。 |
strrchr | 该函数是二进制安全的。 | |
strspn | 新增 start 和 length 参数。 | |
strstr | strstr 成为二进制安全的。 | |
4.2.3 | strcoll | 函数在 Win32 平台可用。 |
4.1.0 | trim | 新增可选的 charlist 参数。 |
4.0.5 | nl2br | nl2br 成为 XHTML 兼容的操作。所有的旧版本都会在 string 的新行之前插入 '<br>' 而不是 '<br />'。 |
4.0.1 | explode | 增加了参数 limit |