On Tue, Feb 4, 2020 at 1:48 PM Aimeos | Norbert Sendetzky
<norb...@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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to