3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $prefix2op = array('53' => 1, '54' => 2, '55' => 3, '50' => 3); function getDefaultOp($number) { global $prefix2op; $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 - 7.1.0
Output for 4.3.0 - 5.3.29
<? $prefix2op = array('53' => 1, '54' => 2, '55' => 3, '50' => 3); function getDefaultOp($number) { global $prefix2op; $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); } ?>