> Sure in many use cases undefined and null can be equivalent, but there
> are other use cases and considering the fact that php does not have a
> user level "undefined" value. It should at least attempt to not be
> ambiguous when possible. Instead of being ambiguous by default,
> requiring the user to do additional work to not be ambiguous.
>
> I do think the method is a great opportunity to avoid ambiguity,
> without a huge sacrifice on cost. As you said, throwing an exception
> would only further complicate things. Sure an empty check would get
> the job done, but again I believe it should not require such
> additional logic just to not be ambiguous.
>

Can we have ultimately a flag in the function for throwing an exception in
case of empty array?

Kind regards,
Jorg

Reply via email to