3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(){ $x = 'something'; $x += array( 'first' => 'a', 'second' => 'y', 'thrid' => 'z' ); return $x; } $y = test(); echo $y['first'];
based on H6ioi
Output for 7.1.0 - 7.3.1
Warning: A non-numeric value encountered in /in/Ao1La on line 6 Fatal error: Uncaught Error: Unsupported operand types in /in/Ao1La:6 Stack trace: #0 /in/Ao1La(12): test() #1 {main} thrown in /in/Ao1La on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.33
Fatal error: Uncaught Error: Unsupported operand types in /in/Ao1La:6 Stack trace: #0 /in/Ao1La(12): test() #1 {main} thrown in /in/Ao1La on line 6
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Invalid operand type was used: cannot perform this operation with arrays in /in/Ao1La on line -1
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Invalid operand type was used: cannot perform this operation with arrays in /in/Ao1La on line 9
Process exited with code 255.
Output for 5.3.22 - 5.6.38
Fatal error: Unsupported operand types in /in/Ao1La on line 9
Process exited with code 255.