3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array( 'x'=>'111', 'y'=>'22', ); $b=array( 'x'=>'333' ); var_dump($a+b, $b+$a, array_merge($a,$b),array_merge($b,$a));
Output for 7.1.0
Notice: Use of undefined constant b - assumed 'b' in /in/Cn8rL on line 14 Warning: A non-numeric value encountered in /in/Cn8rL on line 14 Fatal error: Uncaught Error: Unsupported operand types in /in/Cn8rL:14 Stack trace: #0 {main} thrown in /in/Cn8rL on line 14
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Notice: Use of undefined constant b - assumed 'b' in /in/Cn8rL on line 14 Fatal error: Uncaught Error: Unsupported operand types in /in/Cn8rL:14 Stack trace: #0 {main} thrown in /in/Cn8rL on line 14
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Use of undefined constant b - assumed 'b' in /in/Cn8rL on line 14 Fatal error: Invalid operand type was used: cannot perform this operation with arrays in /in/Cn8rL on line 14
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.2 - 5.6.28
Notice: Use of undefined constant b - assumed 'b' in /in/Cn8rL on line 14 Fatal error: Unsupported operand types in /in/Cn8rL on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant b - assumed 'b' in /in/Cn8rL on line 14 Fatal error: Unsupported operand types in /in/Cn8rL on line 14