3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(mb_detect_encoding("\x19", "ASCII, 7bit, 8bit", true)); var_dump(mb_detect_encoding("\x20", "ASCII, 7bit, 8bit", true)); var_dump(mb_detect_encoding("\x21", "ASCII, 7bit, 8bit", true)); var_dump(mb_detect_encoding("\x8F", "ASCII, 7bit, 8bit", true));
based on uLr8Q
Output for 4.3.3 - 7.2.0
bool(false) string(5) "ASCII" string(5) "ASCII" bool(false)
Output for 4.3.0 - 4.3.2
Warning: Wrong parameter count for mb_detect_encoding() in /in/uZtY6 on line 2 NULL Warning: Wrong parameter count for mb_detect_encoding() in /in/uZtY6 on line 3 NULL Warning: Wrong parameter count for mb_detect_encoding() in /in/uZtY6 on line 4 NULL Warning: Wrong parameter count for mb_detect_encoding() in /in/uZtY6 on line 6 NULL