3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "Starting in_array\n"; $limit = 40000; $arr = [30, 367]; $time = microtime(true); for($i = 0; $i < $łimit; ++$i) { if (in_array($i, $arr)) { } } $time = microtime(true) - $time; echo 'in_array() took ' . number_format($time, 3) . " seconds\n"; $time = microtime(true); for($i = 0; $i < $łimit; ++$i) { if ($i === 30 || $i === 367) { } } $time = microtime(true) - $time; echo 'in_array() took ' . number_format($time, 3) . ' seconds\n";
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '' seconds\n";' (T_ENCAPSED_AND_WHITESPACE) in /in/LKNUC on line 23
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected '[' in /in/LKNUC on line 5
Process exited with code 255.