3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array(); $test['parent'] = array(); $test['parent']['child'] = 'foo'; $test['parent'][$false] = 'bar'; $test['parent'][null] = 'baz'; var_dump($test);
Output for 5.0.4 - 5.6.30, hhvm-3.13.2 - 3.17.3, 7.0.0 - 7.2.6
Notice: Undefined variable: false in /in/s8mZJ on line 5 array(1) { ["parent"]=> array(2) { ["child"]=> string(3) "foo" [""]=> string(3) "baz" } }
Output for hhvm-3.10.1 - 3.12.14
array(1) { ["parent"]=> array(2) { ["child"]=> string(3) "foo" [""]=> string(3) "baz" } }
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: false in /in/s8mZJ on line 5 array(1) { ["parent"]=> array(2) { ["child"]=> string(3) "foo" [""]=> string(3) "baz" } }