3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("a" => "apple", "b" => "banana"); $a =+ array("a" => "pear", "b" => "strawberry", "c" => "cherry"); var_dump($a);
Output for 8.1.24 - 8.1.28, 8.2.11 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught TypeError: Unsupported operand types: array * int in /in/ZY9lN:4 Stack trace: #0 {main} thrown in /in/ZY9lN on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.27, 5.4.0 - 5.4.22, 5.5.0 - 5.5.6
Fatal error: Unsupported operand types in /in/ZY9lN on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Unsupported operand types in /in/ZY9lN on line 4

preferences:
114.25 ms | 401 KiB | 136 Q