3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('xml' => array( 'attributes' => array( 'version' => '1.0', 'encoding' => 'utf-8', ), )); var_dump(array_merge($a['attributes'], array('test' => 'my_test_123')));
Output for 5.3.0 - 7.1.0
Notice: Undefined index: attributes in /in/NCmIo on line 8 Warning: array_merge(): Argument #1 is not an array in /in/NCmIo on line 8 NULL
Output for 5.0.0 - 5.2.17
Notice: Undefined index: attributes in /in/NCmIo on line 8 Warning: array_merge(): Argument #1 is not an array in /in/NCmIo on line 8 NULL
Output for 4.3.0 - 4.4.9
Notice: Undefined index: attributes in /in/NCmIo on line 8 array(1) { ["test"]=> string(11) "my_test_123" }