3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); $b = array(); var_dump($b['foo']); $b = null; var_dump($b['foo1']); $b = "string"; var_dump($b['foo2']); $b = 345678; var_dump($b['foo3']); unset($b['hoihoi']);
based on 18qM5
Output for 5.4.0 - 7.2.0
Notice: Undefined index: foo in /in/s3fBa on line 4 NULL NULL Warning: Illegal string offset 'foo2' in /in/s3fBa on line 10 string(1) "s" NULL
Output for 5.3.0 - 5.3.29
Notice: Undefined index: foo in /in/s3fBa on line 4 NULL NULL string(1) "s" NULL
Output for 4.3.0 - 5.2.17
Notice: Undefined index: foo in /in/s3fBa on line 4 NULL NULL string(1) "s" NULL