3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1,2,3,4]; $b = [2,5,6,7,8]; $c = $a+b; echo ($c);
based on ZLKvi
Output for 7.2.0 - 7.3.0beta1
Warning: Use of undefined constant b - assumed 'b' (this will throw an Error in a future version of PHP) in /in/PdiiM on line 5 Warning: A non-numeric value encountered in /in/PdiiM on line 5 Fatal error: Uncaught Error: Unsupported operand types in /in/PdiiM:5 Stack trace: #0 {main} thrown in /in/PdiiM on line 5
Process exited with code 255.
Output for 7.1.0 - 7.1.20
Notice: Use of undefined constant b - assumed 'b' in /in/PdiiM on line 5 Warning: A non-numeric value encountered in /in/PdiiM on line 5 Fatal error: Uncaught Error: Unsupported operand types in /in/PdiiM:5 Stack trace: #0 {main} thrown in /in/PdiiM on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.27
Notice: Use of undefined constant b - assumed 'b' in /in/PdiiM on line 5 Fatal error: Uncaught Error: Unsupported operand types in /in/PdiiM:5 Stack trace: #0 {main} thrown in /in/PdiiM on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Notice: Use of undefined constant b - assumed 'b' in /in/PdiiM on line -1 Fatal error: Invalid operand type was used: cannot perform this operation with arrays in /in/PdiiM on line -1
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Notice: Use of undefined constant b - assumed 'b' in /in/PdiiM on line 5 Fatal error: Invalid operand type was used: cannot perform this operation with arrays in /in/PdiiM on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Notice: Use of undefined constant b - assumed 'b' in /in/PdiiM on line 5 Fatal error: Unsupported operand types in /in/PdiiM on line 5
Process exited with code 255.