3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $b = null; var_dump($b['foo']); $b = "string"; var_dump($b['foo']); $b = 345678; var_dump($b['foo']);
Output for 5.4.0 - 7.2.0
NULL Warning: Illegal string offset 'foo' in /in/QEKNO on line 7 string(1) "s" NULL
Output for 4.3.0 - 5.3.29
NULL string(1) "s" NULL