3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $prefix2op = array('53' => 1, '54' => 2, '55' => 3, '50' => 3); function getDefaultOp($number) { $globals $op3 = (int) substr($number, 0, 3); if (!($op3 >= 505 && $op3 <= 507)) return 0; $s = substr($number, 0, 2); return $prefix2op[$s]; } $a = array(); for($i = 0; $i < 10000; $i++){ $a[] = getDefaultOp(5073456108 + $i); } ?>
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected '$op3' (T_VARIABLE) in /in/KVSNs on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<? $prefix2op = array('53' => 1, '54' => 2, '55' => 3, '50' => 3); function getDefaultOp($number) { $globals $op3 = (int) substr($number, 0, 3); if (!($op3 >= 505 && $op3 <= 507)) return 0; $s = substr($number, 0, 2); return $prefix2op[$s]; } $a = array(); for($i = 0; $i < 10000; $i++){ $a[] = getDefaultOp(5073456108 + $i); } ?>