3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "好好好" ; mb_strlen('好好好','gbk'); // 5 mb_strlen($str,'utf-8'); // 3 strlen($str); // 9
Output for 4.3.4 - 5.0.5, 5.1.1 - 7.1.0
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/fVqFb on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.3
Warning: mb_strlen(): Unknown encoding "gbk" in /in/fVqFb on line 3
Output for 4.3.0 - 4.3.1
Warning: mb_strlen() [http://www.php.net/function.mb-strlen]: Unknown encoding "gbk" in /in/fVqFb on line 3