3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'foo' => 'bar', 'key' => 'value' ); $start = time(true); for ($i = 0; $i < 10000; $i++) { $a = isset($arr['foo']); $b = isset($arr['bar']); } var_dump(time(true) - $start); $start = time(true); for ($i = 0; $i < 10000; $i++) { $a = array_key_exists('foo', $arr); $b = array_key_exists('bar', $arr); } var_dump(time(true) - $start);
Output for hhvm-3.10.1 - 3.11.1, hhvm-3.13.2 - 3.17.3, 7.3.0alpha1 - 7.3.0rc4
Warning: time() expects exactly 0 parameters, 1 given in /in/7cfPR on line 8 Warning: time() expects exactly 0 parameters, 1 given in /in/7cfPR on line 13 int(0) Warning: time() expects exactly 0 parameters, 1 given in /in/7cfPR on line 15 Warning: time() expects exactly 0 parameters, 1 given in /in/7cfPR on line 20 int(0)
Output for 4.3.0 - 5.6.30, 7.0.0 - 7.2.6
int(0) int(0)
Output for hhvm-3.12.14

Process exited with code 137.