So as a side note aren't there maybe some other array functions which
behave like this?
Good point. I did a quick scan of the source code and came up with a
list of possible candidates for a similar treatment:
This one makes sense in theory, because array_map(null, ...$arrays) is a
way to perform a zip operation in PHP. Unfortunately there is an ugly
special case if there is only a single array, which makes this not actually
usable in practice, unless you know that there are at least two arrays. As
such, accepting zero arrays wouldn't be very useful unless we also want to
fix that issue (PHP 8 maybe?)
array_diff() & friends
array_intersect() & friends
These look like good candidates for allowing a single arg.