go to bug id or search bugs for
The byte stream to check. If it is omitted, this function checks all the input from the beginning of the request.
This description is misleading. What mbstring does is
Return TRUE if all conversions since the execution of the script has no problems at all. Return FALSE if there is any conversion errors in mbstring operations.
If input encoding conversion is done, all inputs (GPC) are converted from mbstring.http_input encoding to mbstring.internal_encoding. If input encoding conversion is not done, it cannot be used for input encoding checks.
I think it's better to check GET/POST/COOKIE encodings, but it was made this way since the introduction, I guess. (I think 1st param was not optional at first, but I don't remember well.)
Add a Patch
Add a Pull Request
Automatic comment from SVN on behalf of yohgaki
Log: Fix bug #68842 mb_check_encoding() behavior does not match document
Rather than change old doc. It's better to change mb_check_encoding() behavior to documented way.