3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0;; while($i < 60000) { $i++; $data1[md5($i)] = true; } $time = microtime(true); echo "Starting array_key_exists\n"; array_key_exists('notexistingkey', $data); $time = microtime(true) - $time; echo "Starting isset\n"; isset($data['notexistingkey']); $time = microtime(true) - $time;
Output for 7.4.0
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: array_key_exists() expects parameter 2 to be array, unknown given in /in/aCAUs on line 11 Starting isset
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: array_key_exists() expects parameter 2 to be array, null given in /in/aCAUs on line 11 Starting isset
Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: array_key_exists(): The second argument should be either an array or an object in /in/aCAUs on line 11 Starting isset
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.3
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: array_key_exists(): The second argument should be either an array or an object in /in/aCAUs on line 11 Starting isset
Output for 4.3.0 - 4.3.1
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: array_key_exists() [http://www.php.net/function.array-key-exists]: The second argument should be either an array or an object in /in/aCAUs on line 11 Starting isset

preferences:
210.19 ms | 401 KiB | 261 Q