The following changes have been made to classes/functions/methods of this extension.
Version | Function | Description |
---|---|---|
5.4.1 | hex2bin | A warning is thrown if the input string is of odd length. In PHP 5.4.0 the string was silently accepted, but the last byte was truncated. |
5.4.0 | get_html_translation_table | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. |
get_html_translation_table | The default value for the encoding parameter was changed to UTF-8. | |
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 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 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 | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
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.4 | get_html_translation_table | The encoding parameter was added. |
5.3.2 | crypt | Added SHA-256 and SHA-512 crypt based on Ulrich Drepper's implementation. |
crypt | Fixed Blowfish behaviour on invalid rounds to return "failure" string ("*0" or "*1"), instead of falling back to DES. | |
5.3.0 | crypt | PHP now contains its own implementation for the MD5 crypt, Standard DES, Extended DES and the Blowfish algorithms and will use that if the system lacks of support for one or more of the algorithms. |
htmlentities | The constant ENT_IGNORE was added. | |
htmlspecialchars | The constant ENT_IGNORE was added. | |
nl2br | Added the optional is_xhtml parameter. | |
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 | Added the optional parameter 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 | Added the optional parameter 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 | Support for negative limits was added |
md5_file | Changed the function to use the streams API. It means that you can use it with wrappers, like md5_file('http://example.com/..') | |
sha1_file | Changed the function to use the streams API. It means that you can use it with wrappers, like sha1_file('http://example.com/..') | |
str_word_count | Added the charlist parameter | |
substr_compare | Added the possibility to use a negative offset. | |
substr_count | Added the offset and the length parameters | |
5.0.0 | html_entity_decode | Support for multi-byte encodings was added. |
md5 | The raw_output parameter was added. | |
md5_file | Added the raw_output parameter | |
sha1 | The raw_output parameter was added. | |
sha1_file | Added the raw_output parameter | |
str_ireplace | The count parameter was added. | |
str_replace | The count parameter was added. | |
strip_tags | strip_tags is now binary safe | |
strrpos | The needle may now be a string of more than one character. | |
strrpos | The offset parameter was introduced. | |
4.3.3 | str_replace | The behaviour of this function changed. In older versions a bug existed when using arrays as both search and replace parameters which caused empty search indexes to be skipped without advancing the internal pointer on the replace array. This has been corrected in PHP 4.3.3, any scripts which relied on this bug should remove empty search values prior to calling this function in order to mimic the original behavior. |
substr_replace | All parameters now accept arrays. | |
4.3.0 | implode | The glue parameter became optional. |
setlocale | Passing multiple locales became possible. | |
str_rot13 | The behaviour of this function was fixed. Before this fix, the str was also modified, as if it was passed by reference. | |
strcspn | The start and length were added | |
strip_tags | HTML comments are now always stripped | |
stristr | stristr was made binary safe. | |
strrchr | This function is now binary safe. | |
strspn | The start and length parameters were added | |
strstr | strstr was made binary safe. | |
4.2.3 | strcoll | This function now works on win32. |
4.2.0 | setlocale | Passing category as a string is now deprecated, use the above constants instead. Passing them as a string (within quotes) will result in a warning message. |
4.1.0 | htmlentities | The encoding parameter was added. |
htmlspecialchars | The encoding parameter was added. | |
ltrim | The charlist parameter was added. | |
rtrim | The charlist parameter was added. | |
trim | The optional charlist parameter was added. | |
4.0.6 | sprintf | Support for argument numbering/swapping was added |
4.0.5 | nl2br | nl2br is now XHTML compliant. All older versions will return string with '<br>' inserted before newlines instead of '<br />'. |
str_replace | Most parameters can now be an array. | |
4.0.3 | htmlentities | The flags parameter was added. |
parse_str | The arr parameter was added | |
wordwrap | The optional cut parameter was added. | |
4.0.1 | explode | The limit parameter was added |