3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = []; $b = null; $res = array_merge($a, $b); var_dump($res);
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/GWTJF:5 Stack trace: #0 /in/GWTJF(5): array_merge(Array, NULL) #1 {main} thrown in /in/GWTJF on line 5
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/GWTJF on line 5 NULL
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: array_merge(): Argument #2 is not an array in /in/GWTJF on line 5 NULL

preferences:
166.42 ms | 402 KiB | 212 Q