更新日志

对本扩展的类/函数/方法有以下更新。

VersionFunctionDescription
8.2.0lcfirst大小写转换不在依赖于使用 setlocale 设置的区域。只会转换 ASCII 字符。
 str_ireplace大小写转换不在依赖于使用 setlocale 设置的区域。只会进行 ASCII 大小写转换。非 ASCII 字节值将通过它们的字节值进行比较。
 str_split如果 string 为空,现在返回空 array。之前返回的 array 包含单个空字符串。
 strcasecmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 strcmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 stripos大小写转换不在依赖于使用 setlocale 设置的区域。只会进行 ASCII 大小写转换。非 ASCII 字节值将通过它们的字节值进行比较。
 stristr大小写转换不在依赖于使用 setlocale 设置的区域。只会进行 ASCII 大小写转换。非 ASCII 字节值将通过它们的字节值进行比较。
 strnatcasecmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 strnatcmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 strncasecmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 strncmp现在此函数返回 -1 或者 1,之前返回负数或正数。
 strripos大小写转换不在依赖于使用 setlocale 设置的区域。只会进行 ASCII 大小写转换。非 ASCII 字节值将通过它们的字节值进行比较。
 strtolower大小写转换不在依赖于使用 setlocale 设置的区域。只会转换 ASCII 字符。
 strtoupper大小写转换不在依赖于使用 setlocale 设置的区域。只会转换 ASCII 字符。
 substr_compare现在此函数返回 -1 或者 1,之前返回负数或正数。
 ucfirst大小写转换不在依赖于使用 setlocale 设置的区域。只会转换 ASCII 字符。
 ucwords大小写转换不在依赖于使用 setlocale 设置的区域。只会转换 ASCII 字符。
 utf8_decode弃用此函数。
 utf8_encode弃用此函数。
8.1.0get_html_translation_tableflags 从 ENT_COMPAT 更改为 ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401。
 html_entity_decodeflags changed from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
 htmlentitiesflags 从 ENT_COMPAT 变更为 ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401。
 htmlspecialcharsflags 从 ENT_COMPAT 变更为 ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401。
 htmlspecialchars_decodeflags 从 ENT_COMPAT 变更为ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401。
8.0.0convert_uuencode在此版本之前,尝试转换空字符串将返回 false,没有任何特殊原因。
 count_chars在此版本之前,函数在失败时返回 false。
 cryptsalt不再可选。
 html_entity_decodeencoding is nullable now.
 htmlentitiesencoding 现在可以为 null。
 implode在 array 之后传递 separator 已不再支持。
 levenshtein在此版本之前,必须使用两个或者五个参数调用 levenshtein。
 levenshtein在此版本之前,如果某个参数字符串的长度超过 255 个字符,则 levenshtein 将会返回 -1。
 metaphoneThe function returned false on failure.
 number_format在此版本之前,number_format 接受一个、两个或四个参数(不会是三个)。
 parse_strresult 是必须项。
 soundexPrior to this version, calling the function with an empty string returned false for no particular reason.
 sprintf此函数失败时不再返回 false 。
 str_split如果 length 小于 1,现在会抛出 ValueError;之前会触发 E_WARNING 级别的错误且函数会返回 false。
 str_word_countcharacters 可为空(Nullable)类型。
 strcspnlength 现在允许为 null。
 strip_tagsallowed_tags 允许为 null。
 stripos不再支持 int 传递给 needle。
 stristr不再支持 int 传递给 needle。
 strpos不再支持 int 传入 needle。
 strrchr不再支持将 int 作为 needle 传递。
 strripos不再支持将 int 传递给 needle。
 strrpos不再支持将 int 传递给 needle。
 strspnlength 现在允许为 null。
 strstr不再支持传递 int 作为 needle。
 substr现在 length 允许为 null。当 length 显式设置为 null 时,函数返回在字符串末尾结束的子字符串,而之前将返回空字符串。
 substr函数将返回空字符串, 在此之前返回 false。
 substr_comparelength 现在允许为 null。
 substr_countlength 可以为空(nullable)。
 substr_replacelength 现在允许为 null。
 vsprintf此函数失败时不再返回 false 。
7.4.0chr此函数不再静默接受不支持的 codepoint,并会将它们转为 0。
 implode在 array 之后传递 separator (即:使用遗留写法)已被废弃。
 money_format弃用此函数。使用 NumberFormatter::formatCurrency 替代。
 str_getcsvescape 现在将空字符串视为禁用专有转义机制的信号。以前视为默认参数值。
 strip_tagsallowed_tags 现在可以接受 array。
7.3.0stripos弃用 int 传递给 needle。
 stristr弃用 int 传递给 needle。
 strpos弃用 int 传入 needle。
 strrchr弃用将 int 作为 needle 传递。
 strripos弃用将 int 传递给 needle。
 strrpos弃用将 int 传递给 needle。
 strstr弃用传递 int 作为 needle。
7.2.18, 7.3.5substr_compareoffset 现在可能等于 haystack。
7.2.0number_formatnumber_format 现在再也不会返回 -0,之前 num 为 -0.01 的情况下可以返回 -0。
 parse_str不带第二个参数的情况下使用 parse_str 会产生 E_DEPRECATED 警告。
 utf8_decodeThis function has been moved from the XML extension to the core of PHP. In previous versions, it was only available if the XML extension was installed.
 utf8_encodeThis function has been moved from the XML extension to the core of PHP. In previous versions, it was only available if the XML extension was installed.
7.1.0str_shuffle内置的随机算法从 libc rand 函数更改为梅森旋转伪随机数生成算法。
 stripos开始支持负数的 offset。
 strpos开始支持负数的 offset。
 substr_count开始支持负数的 offset 和 length。
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top