3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $♫ = "music"; var_dump( $♫ ); // string(5) "music" $len = 0; $string = "♫"; var_dump($len = mb_strlen("♫", '8bit')); echo mb_substr($string, 0, $len);
Output for 4.3.0 - 7.1.0
string(5) "music" int(3) ♫