← All docs
mb_check_encoding()
Checks encoded strings or array keys and values recursively for invalid byte sequences.
mb_check_encoding()
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool
Checks encoded strings or array keys and values recursively for invalid byte sequences.
Parameters:
$value(array|string|null), defaultnull, optional$encoding(?string), defaultnull, optional
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported through a declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/mb_check_encoding.rs).
No examples yet. Check examples/ and showcases/ for usage patterns.
Internals
For how mb_check_encoding is implemented in the compiler, see the internals page.