3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $t = ['1234' => [5, 'wda', 'sd'], '321' => ['5sd', 'awdaw', '1sd3']]; $t2 = ['123123' => [15, '1wda', 's32d'], '321' => ['12', 'ds']]; $t = $t2 + $t; var_dump($t);
based on hsHiK
Output for 5.4.0 - 7.2.0
array(3) { [123123]=> array(3) { [0]=> int(15) [1]=> string(4) "1wda" [2]=> string(4) "s32d" } [321]=> array(2) { [0]=> string(2) "12" [1]=> string(2) "ds" } [1234]=> array(3) { [0]=> int(5) [1]=> string(3) "wda" [2]=> string(2) "sd" } }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/7boSX on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/7boSX on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/7boSX on line 3
Process exited with code 255.