3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ [1],[2] ]; $b = [ [3], [5,5] ]; print_r($a+b);
Output for 7.2.0
Warning: Use of undefined constant b - assumed 'b' (this will throw an Error in a future version of PHP) in /in/llT70 on line 9 Warning: A non-numeric value encountered in /in/llT70 on line 9 Fatal error: Uncaught Error: Unsupported operand types in /in/llT70:9 Stack trace: #0 {main} thrown in /in/llT70 on line 9
Process exited with code 255.
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant b - assumed 'b' in /in/llT70 on line 9 Warning: A non-numeric value encountered in /in/llT70 on line 9 Fatal error: Uncaught Error: Unsupported operand types in /in/llT70:9 Stack trace: #0 {main} thrown in /in/llT70 on line 9
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Notice: Use of undefined constant b - assumed 'b' in /in/llT70 on line 9 Fatal error: Uncaught Error: Unsupported operand types in /in/llT70:9 Stack trace: #0 {main} thrown in /in/llT70 on line 9
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Notice: Use of undefined constant b - assumed 'b' in /in/llT70 on line 9 Fatal error: Unsupported operand types in /in/llT70 on line 9
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/llT70 on line 2
Process exited with code 255.