3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = 'T├Ąglich montags bis freitags'; $encoding = mb_detect_encoding($s, array('UTF-8', 'ISO-8859-1'), true); $hex = bin2hex($s); var_dump($encoding); var_dump($hex);
Output for 4.3.3 - 7.1.0
string(5) "UTF-8" string(58) "54c3a4676c696368206d6f6e7461677320626973206672656974616773"
Output for 4.3.0 - 4.3.2
Warning: Wrong parameter count for mb_detect_encoding() in /in/U7nBE on line 4 NULL string(58) "54c3a4676c696368206d6f6e7461677320626973206672656974616773"