PHP mb_detect_encoding() Function
The mb_detect_encoding() function detects the character encoding of a string.
Syntax
mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false
Try It Online
Output
Click Run to execute your code
Enjoying these tutorials?