3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $max = 60000; while($i < $max) { $i++; $data[md5($i)] = true; } $stime = microtime(true); $i=0; while($i < $max) { array_key_exists('notexistingkey', $data); } $time = microtime(true) - $stime; echo "Starting array_key_exists => $time\n"; $stime = microtime(true); $i=0; while($i < $max) { isset($data['notexistingkey']); } $time = microtime(true) - $stime; echo "Starting isset => $time\n";
Output for 4.3.1 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.27, 5.4.0 - 5.4.21, 7.0.20, 7.1.5 - 7.1.7, 7.2.0

Process exited with code 137.

preferences:
104.14 ms | 403 KiB | 112 Q