3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 6; var_dump($a['foo']); var_dump($a['foo'] !== null); echo "\n---\n"; $a = []; var_dump($a['foo']); var_dump($a['foo'] !== null);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.21.3, 7.0.0 - 7.3.1
NULL bool(false) --- Notice: Undefined index: foo in /in/fsbh2 on line 10 NULL Notice: Undefined index: foo in /in/fsbh2 on line 11 bool(false)
Output for hhvm-3.22.0
NULL bool(false) --- Notice: Undefined index: foo in /in/fsbh2 on line -1 NULL Notice: Undefined index: foo in /in/fsbh2 on line -1 bool(false)