Re: [PHP-DEV] Re: [RFC] "arrayable" pseudo type hint

This is only part of a thread. view whole thread
  108401
February 4, 2020 18:51 guilliam.xavier@gmail.com (Guilliam Xavier)
On Tue, Feb 4, 2020 at 1:48 PM Aimeos | Norbert Sendetzky
<norbert@aimeos.com> wrote:
> > [...] > > interface Arrayable extends ArrayAccess, Countable, Traversable > { > public function toArray() : array; > } > > [...] > > If union data types are available and "iterable" is implemented as > alias, an alias "arrayable" for "array|Arrayable" may be added as well.
About that last point: it would not be possible to have both the `Arrayable` interface and the `arrayable` reserved word because PHP is case-insensitive for those things (the same way you cannot declare an `interface Iterable` because of the `iterable` reserved word, <https://3v4l.org/Fhqar>), so you would need another name (if you want the alias) -- Guilliam Xavier