Re: Introducing "Array Of" RFC

From: Date: Thu, 27 Feb 2014 22:28:19 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 2/27/14 3:34 PM, Marco Pivetta wrote:
On 27 February 2014 22:11, Philip Sturgeon <[email protected]> wrote:
So, should we allow nulls in an arrayof-style type hint?
null has its own type, which is mismatching the type required by the array-of syntax when requesting, for example, Foo[]. If null was allowed in the array, as a user, I'd still be forced to array_filter() on every call, so it would defeat the new feature completely.
^^ My general stance. (Unless an "allow both" syntax is possible; if not, the above.) --Larry Garfield

Thread (73 messages)

« previous php.internals (#72848) next »