Re: RFC - Array Of for PHP 7
| From: | Levi Morrison | Date: | Tue, 31 Oct 2017 17:37:17 +0000 |
| Subject: | Re: RFC - Array Of for PHP 7 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-101002@lists.php.net to get a copy of this message | ||
My thoughts on the RFC:
- The syntax
typename[] is a poor. Consider how nullability might
bind ?int[]. Is that (?int)[] or ?(int[]) ? Here are some
variants that do not have this issue:
[?int] and ?[int]
array<?int> and ?array<int>
- Our current infrastructure requires us to check every element of
the array for conformance. While undesirable I believe this can be
optimized away in the future if we care enough, and therefore not a
show-stopper.