3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $val = 8/16; $fbase = 10; $tbase = 16; $newbase = 16; if (strcmp($val, base_convert($val, $fbase, $tbase))) { /* $val isn't purely in base $base */ } else { $newval = base_convert($val, $base, $newbase); echo "new val is $newval"; }
Output for 4.3.0 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0