3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = "три"; $s_cp = mb_detect_encoding($s, "windows-1251"); echo $s, ' ', strlen($s); echo "\n"; echo $s_cp, ' ', strlen($s_cp);
based on MMnu2
Output for 4.3.4 - 7.2.0
три 6 Windows-1251 12
Output for 4.3.2 - 4.3.3
Warning: mb_detect_encoding(): Illegal argument in /in/U8bQA on line 3 три 6 UTF-8 5
Output for 4.3.0 - 4.3.1
Warning: mb_detect_encoding() [http://www.php.net/function.mb-detect-encoding]: Illegal argument in /in/U8bQA on line 3 три 6 UTF-8 5