3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test {function mb_strlen($v){return mb_strlen($v);}} $type = 'mb_str'; $obj = new Test; if (version_compare(PHP_VERSION, "7.0", ">=")) { echo eval('return $obj->{$type . "len"}($type);'); }
Output for 7.0.0 - 7.1.0
6
Output for 4.3.0 - 5.6.28