> if you pass an array which mixes both objects and null and you want to work on the objects, you
> still have to do the checks
> yourself:
I agree, in this case it would be useful if Foo[] excludes members which are NULL. I guess I did not
make it clear enough what I tried to point out.
A new feature should not just work for some use cases because the majority of people would use it
this way but also for other use cases as long as they are valid.
So my point was that the RFC has to consider both cases, once excluding NULL and once with NULL as
valid entry. As long as it doesn't it is incomplete IMO.
Andrea made a nice suggestion for the syntax and I would go for it:
> > function foo(Bar? $a) {} // $a is Bar/null
> > function foo(Bar?[] $a) {} // $a is array of Bars/nulls
> > function foo(Bar[]? $a) {} // $a is array of Bars, or null
> > function foo(Bar?[]? $a) {} // $a is array of Bars/nulls, or null