Re: [RFC] Iterable

From: Date: Mon, 13 Jun 2016 11:42:15 +0000
Subject: Re: [RFC] Iterable
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-93932@lists.php.net to get a copy of this message
On 11.06.2016 at 01:37, Aaron Piotrowski wrote: > I would like to propose a new iterable pseudo-type that accepts both arrays and objects > implementing Traversable. Values accepted by iterable can then be used with foreach and yield from, > or help to reduce type-checking logic in general. > > Please review the RFC here: https://wiki.php.net/rfc/iterable > <https://wiki.php.net/rfc/iterable> Thanks, Aaron! I definitely like this idea (I'm not sure about the details yet – would have to thoroughly investigate), as it is apparently solving a long-standing issue, and is in my opinion a cleaner solution than (explicitly) having to resort to a union type. -- Christoph M. Becker

« previous php.internals (#93932) next »