You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mb_detect_encoding()'s "non-strict" mode now behaves as described in the documentation. Previously, it would return false if the same byte (for example, the first byte) of the input string was invalid in all candidate encodings. More generally, it would eliminate candidate encodings from consideration when an invalid byte was seen, and if the same input byte eliminated all remaining encodings still under consideration, it would return false. On the other hand, if all candidate encodings but one were eliminated from consideration, it would return the last remaining one without regard for how many encoding errors might be encountered later in the string. This is different from the behavior described in the documentation, which says: "If strict is set to false, the closest matching encoding will be returned."
If you want an exact-or-nothing match then use the $strict parameter. https://3v4l.org/bLYlB
Description
The following code:
Resulted in this output on 8.1.28:
Resulted in this output on 8.3.6:
https://3v4l.org/TY6vO
But I expected: no sure what to expect and which one is right/wrong ;)
PHP Version
8.3.6
Operating System
Ubuntu24.04 lts
The text was updated successfully, but these errors were encountered: