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))) { echo $val isn't purely in base $tbase; } else { $newval = base_convert($val, $base, $newbase); echo "new val is $newval"; }
Output for 5.4.0 - 5.5.7
Parse error: syntax error, unexpected 'isn' (T_STRING), expecting ',' or ';' in /in/33bkU on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/33bkU on line 8
Process exited with code 255.