Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

mbstring_binary_safe_encoding()

3 tags 1 category

mbstring_binary_safe_encoding() — Sets the mbstring internal encoding to a binary safe encoding when func_overload is enabled. When mbstring.func_overload is in use for multi-byte encodings, the results from strlen() and similar functions respect the utf8 characters, causing binary data to return incorrect lengths. This function overrides the mbstring encoding to a binary-safe encoding, and resets it to the users expected encoding afterwards through the reset_mbstring_encoding function. It is safe to recursively call this function, however each mbstring_binary_safe_encoding() call must be followed up with an equal number of reset_mbstring_encoding() calls.

Inputs: $reset (bool): Optional. Whether to reset the encoding back to a previously-set encoding. Default false.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…