3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_detect_encoding(chr(129).chr(167), 'ISO-8859-*', true));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught ValueError: mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "ISO-8859-*" in /in/ZJVfI:3 Stack trace: #0 /in/ZJVfI(3): mb_detect_encoding('\x81\xA7', 'ISO-8859-*', true) #1 {main} thrown in /in/ZJVfI on line 3
Process exited with code 255.
Output for 5.2.3 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.35, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
Warning: mb_detect_encoding(): Illegal argument in /in/ZJVfI on line 3 bool(false)
Output for 4.4.3 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
<br /> <b>Warning</b>: mb_detect_encoding() [<a href='function.mb-detect-encoding'>function.mb-detect-encoding</a>]: Illegal argument in <b>/in/ZJVfI</b> on line <b>3</b><br /> bool(false)
Output for 4.3.4 - 4.3.11, 4.4.0 - 4.4.2
<br /> <b>Warning</b>: mb_detect_encoding(): Illegal argument in <b>/in/ZJVfI</b> on line <b>3</b><br /> bool(false)
Output for 4.3.3
<br /> <b>Warning</b>: mb_detect_encoding(): Illegal argument in <b>/in/ZJVfI</b> on line <b>3</b><br /> string(4) "SJIS"
Output for 4.3.0 - 4.3.2
<br /> <b>Warning</b>: Wrong parameter count for mb_detect_encoding() in <b>/in/ZJVfI</b> on line <b>3</b><br /> NULL

preferences:
254.88 ms | 401 KiB | 345 Q