1082array_merge behaves differently in PHP 7 and PHP 8

The array_merge function produces unexpected results on a PHP 8 server, as compared to a PHP 7 server.

$output = array_merge($array1, $array2);

In PHP 8, if array2 is empty, the $output array is also empty.

In PHP 7, if array2 is empty, the $output array is $array1.

TODO

  • [ ] Make test page.