Skip to content

2.2.0

Compare
Choose a tag to compare
@aboks aboks released this 19 Jul 14:20
· 43 commits to master since this release

This project now requires PHP 7.1 or newer.

New sniff added: MoxioSniffs.PHP.DisallowMbDetectEncoding, which disallows usage of mb_detect_encoding. This function has a misleading name that implies it can actually detect the encoding of a string, a problem which is generally impossible. Rather it checks a list of encodings until it finds one that could be the right one (i.e. the string is a valid byte sequence according to that encoding). Using mb_check_encoding (possibly in a loop) instead makes this much more explicit. See this talk for more background information on this topic.