3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = array(); var_dump(isset($foo['a'])); var_dump(isset($foo['a']['b'])); var_dump(isset($foo['a']->bar['b'])); var_dump(isset($foo[$bar][$baz])); var_dump(isset($bar['a'])); var_dump(isset($bar['a']['b']));
Output for 5.1.6 - 5.6.28, 7.0.0 - 7.1.0
bool(false) bool(false) bool(false) Notice: Undefined variable: bar in /in/CJh5e on line 8 Notice: Undefined variable: baz in /in/CJh5e on line 8 bool(false) bool(false) bool(false)
Output for hhvm-3.10.0 - 3.12.0
bool(false) bool(false) bool(false) bool(false) bool(false) bool(false)
Output for 5.0.4 - 5.1.5
bool(false) bool(false) Notice: Trying to get property of non-object in /in/CJh5e on line 7 bool(false) Notice: Undefined variable: bar in /in/CJh5e on line 8 Notice: Undefined variable: baz in /in/CJh5e on line 8 bool(false) bool(false) bool(false)
Output for 5.0.0 - 5.0.3
bool(false) bool(false) Notice: Trying to get property of non-object in /in/CJh5e on line 7 bool(false) Notice: Undefined variable: bar in /in/CJh5e on line 8 Notice: Undefined variable: baz in /in/CJh5e on line 8 bool(false) bool(false) bool(false)
Output for 4.3.0 - 4.4.9
bool(false) bool(false) bool(false) Notice: Undefined variable: bar in /in/CJh5e on line 8 Notice: Undefined variable: baz in /in/CJh5e on line 8 bool(false) bool(false) bool(false)