Re: Introducing "Array Of" RFC
| From: | Sara Golemon | Date: | Thu, 16 Jan 2014 19:44:33 +0000 |
| Subject: | Re: Introducing "Array Of" RFC | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71191@lists.php.net to get a copy of this message | ||
>> * Typed arrays - Arrays are a special primitive which can be typed as
>> implicitly or explicitly numerically indexed, or associative, and to
>> specific types:
>> array<Tv> or array<Tk,Tv>
>>
>
> Out of curiosity, does HHVM support both use cases: NULL as a valid member and NULL as an
> error?
> If so, how does the syntax differ?
>
That's captured via Nullable types.
array<Foo> is an array of Foo objects (nulls not allowed).
array<?Foo> is an array of (Foo Objects or NULL)
-Sara