Why does array_map() with null as callback create an "array of arrays"?
PHP Snippet 1:
$d = array_map('array', $a, $b, $c);
PHP Snippet 2:
$array = [
[1 => 'one', 2 => 'two', 3 => 'three']
];
var_export(array_map(fn() => func_get_args(), ...$array));
echo "\n---\n";
var_export(array_map(null, ...$array));
PHP Snippet 3:
array (
1 =>
array (
0 => 'one',
),
2 =>
array (
0 => 'two',
),
3 =>
array (
0 => 'three',
),
)
---
array (
1 => 'one',
2 => 'two',
3 => 'three',
)