3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 5.3.0 - 5.6.28, 7.0.0 - 7.1.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, null given in /in/aCAUs on line 11 Starting isset
Output for hhvm-3.10.0 - 3.12.0
Starting array_key_exists Notice: Undefined variable: data in /in/aCAUs on line 11 Warning: Invalid operand type was used: array_key_exists expects an array or an object; false returned. in /in/aCAUs on line 11 Starting isset
Output for 5.0.4 - 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 - 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