The reason is probably to distinguish between an empty set of objects to process, and slightly different functionality when nothing is put in.
As a hypothetical example, let's say you have a function that creates reports for users. The input array contains the IDs (or even objects) of the users for which the reports are to be generated. The same function might as well be used to process the reports when you need to process all of the users, as opposed to a certain set of them. When you only want to process for specific users, you would throw in the array. But if you wanted to process all of them, then it makes sense that the parameter is a distinct NULL instead of a "no users", which would be an empty array.
For example, let's say that there's a page where an administrator can designate which users to create reports for. But the admin presses the "Create Reports" button without selecting any users, in which case an empty array would get thrown into the function, and the function would accurately process no users, because there are no users in the array.
Then perhaps you might have a different button somewhere else in this hypothetical system, "Create All Reports", in which case you wouldn't throw anything in, and the function would be able to tell the difference between "number of users = 0" and "users not provided", which in this case would mean "all users".
That's one example. In general, I use NULL as a default parameter to be able to distinguish within the function whether something was passed or not, because the behavior of the function might be different when nothing in particular is specified, as per the example given above.
$arg
will not be cast to an array(). It will benull
inside foo if no argument is supplied. – Highbinder