3v4l.org

run code in 150+ 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.28, 7.0.0 - 7.1.0
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.0 - 3.12.0
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" } }