3v4l.org

run code in 150+ 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 4.3.0 - 4.4.2, 4.4.4 - 5.4.13, 5.4.15 - 5.4.43, 5.4.45 - 7.1.0
int(0) int(0)
Output for 5.4.14, 5.4.44
int(0) int(1)
Output for 4.4.3
int(1) int(0)