3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function array_key_exists_recursive($key, array $array, $strict = false) { foreach ($array as $k => $v) { if ($strict && $key === $k) { return true; } else if (!$strict && $key == $k) { return true; } else if (is_array($v) { return array_key_exists_recursive($key, $v, $strict); } } } $array = Array ( [21] => Array ( ) [24] => Array ( [22] => Array ( ) [25] => Array ( [26] => Array ( ) ) ) ); var_dump(array_key_exists_recursive(22, $array));
Output for 5.3.0 - 5.4.21
Parse error: syntax error, unexpected '{' in /in/4BVPs on line 8
Process exited with code 255.