3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $max = 600000; 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 5.4.0 - 5.4.21, 5.5.0 - 5.5.5
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 105 bytes) in /in/JeSiU on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/JeSiU on line 5
Process exited with code 255.
Output for 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/JeSiU on line 5
Process exited with code 255.
Output for 5.2.2 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 104 bytes) in /in/JeSiU on line 5
Process exited with code 255.
Output for 5.2.1
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 21 bytes) in /in/JeSiU on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0

Process exited with code 137.

preferences:
97.83 ms | 402 KiB | 114 Q