3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export(array_merge(['product' => 'p'], null));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /in/IfPuG:3 Stack trace: #0 /in/IfPuG(3): array_merge(Array, NULL) #1 {main} thrown in /in/IfPuG on line 3
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: array_merge(): Expected parameter 2 to be an array, null given in /in/IfPuG on line 3 NULL
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: array_merge(): Argument #2 is not an array in /in/IfPuG on line 3 NULL

preferences:
239.31 ms | 402 KiB | 283 Q