3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 'abc'; echo "Not passing encoding: "; echo mb_substr($a, 0); echo "\n"; echo "Passing null, and encoding: "; echo mb_substr($a, 0, null, 'utf-8'); echo "\n";
Output for 5.4.8 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Not passing encoding: abc Passing null, and encoding: abc
Output for 4.3.0 - 5.4.7
Not passing encoding: abc Passing null, and encoding: