3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data=array('data'=>array('something')); echo "Good\n"; var_dump(isset($data['data'][0])); var_dump($data['data'][0]); echo "\nBad\n"; var_dump(isset($data['data'][0]['data'])); var_dump(@$data['data'][0]['data']); echo "\nUgly\n"; var_dump(isset($data['data'][0]['data'][0])); var_dump(@$data['data'][0]['data'][0]);
Output for 7.0.0 - 7.1.0
Good bool(true) string(9) "something" Bad bool(false) string(1) "s" Ugly bool(false) string(1) "s"
Output for 5.4.0 - 5.6.28
Good bool(true) string(9) "something" Bad bool(false) string(1) "s" Ugly bool(true) string(1) "s"
Output for 5.0.3 - 5.3.29
Good bool(true) string(9) "something" Bad bool(true) string(1) "s" Ugly bool(false)
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Good bool(true) string(9) "something" Bad bool(false) string(1) "s" Ugly bool(false)
Process exited with code 255.
Output for 4.3.0 - 4.4.9
Good bool(true) string(9) "something" Bad bool(true) string(1) "s" Ugly bool(false) NULL