Changelog

The following changes have been made to classes/functions/methods of this extension.

VersionFunctionDescription
5.4.1hex2binA 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.0get_html_translation_tableThe constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 get_html_translation_tableThe default value for the encoding parameter was changed to UTF-8.
 html_entity_decodeDefault encoding changed from ISO-8859-1 to UTF-8.
 html_entity_decodeThe constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 htmlentitiesThe default value for the encoding parameter was changed to UTF-8.
 htmlentitiesThe constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 htmlspecialcharsThe constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 htmlspecialcharsThe default value for the encoding parameter was changed to UTF-8.
 htmlspecialchars_decodeThe constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 number_formatThis 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.4get_html_translation_tableThe encoding parameter was added.
5.3.2cryptAdded SHA-256 and SHA-512 crypt based on Ulrich Drepper's implementation.
 cryptFixed Blowfish behaviour on invalid rounds to return "failure" string ("*0" or "*1"), instead of falling back to DES.
5.3.0cryptPHP 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.
 htmlentitiesThe constant ENT_IGNORE was added.
 htmlspecialcharsThe constant ENT_IGNORE was added.
 nl2brAdded the optional is_xhtml parameter.
 setlocaleThis function now throws an E_DEPRECATED notice if a string is passed to the category parameter instead of one of the LC_* constants.
 stristrAdded the optional parameter before_needle.
 strlenPrior versions treated arrays as the string Array, thus returning a string length of 5 and emitting an E_NOTICE level error.
 strstrAdded the optional parameter before_needle.
5.2.5addcslashesThe escape sequences \v and \f were added.
5.2.3htmlentitiesThe double_encode parameter was added.
 htmlspecialcharsThe double_encode parameter was added.
5.2.2 - 5.2.6substrIf the start parameter indicates the position of a negative truncation or beyond, false is returned. Other versions get the string from start.
5.1.0explodeSupport for negative limits was added
 md5_fileChanged the function to use the streams API. It means that you can use it with wrappers, like md5_file('http://example.com/..')
 sha1_fileChanged the function to use the streams API. It means that you can use it with wrappers, like sha1_file('http://example.com/..')
 str_word_countAdded the charlist parameter
 substr_compareAdded the possibility to use a negative offset.
 substr_countAdded the offset and the length parameters
5.0.0html_entity_decodeSupport for multi-byte encodings was added.
 md5The raw_output parameter was added.
 md5_fileAdded the raw_output parameter
 sha1The raw_output parameter was added.
 sha1_fileAdded the raw_output parameter
 str_ireplaceThe count parameter was added.
 str_replaceThe count parameter was added.
 strip_tagsstrip_tags is now binary safe
 strrposThe needle may now be a string of more than one character.
 strrposThe offset parameter was introduced.
4.3.3str_replaceThe 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_replaceAll parameters now accept arrays.
4.3.0implodeThe glue parameter became optional.
 setlocalePassing multiple locales became possible.
 str_rot13The behaviour of this function was fixed. Before this fix, the str was also modified, as if it was passed by reference.
 strcspnThe start and length were added
 strip_tagsHTML comments are now always stripped
 stristrstristr was made binary safe.
 strrchrThis function is now binary safe.
 strspnThe start and length parameters were added
 strstrstrstr was made binary safe.
4.2.3strcollThis function now works on win32.
4.2.0setlocalePassing 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.0htmlentitiesThe encoding parameter was added.
 htmlspecialcharsThe encoding parameter was added.
 ltrimThe charlist parameter was added.
 rtrimThe charlist parameter was added.
 trimThe optional charlist parameter was added.
4.0.6sprintfSupport for argument numbering/swapping was added
4.0.5nl2brnl2br is now XHTML compliant. All older versions will return string with '<br>' inserted before newlines instead of '<br />'.
 str_replaceMost parameters can now be an array.
4.0.3htmlentitiesThe flags parameter was added.
 parse_strThe arr parameter was added
 wordwrapThe optional cut parameter was added.
4.0.1explodeThe limit parameter was added