On Sat, 12 Jan 2019 at 20:13, Dan Ackroyd <dan...@basereality.com> wrote:
> I think the correct long-term solution for this would be for us to > revisit the union type RFC (https://wiki.php.net/rfc/union_types) and > so be able to define a type like: > > type foreachable = object|iterable; > This argument makes sense to me in a pre-iterable world, but as we already have an iterable type I don't understand why it shouldn't accept stdClass as well as array. What about an array is more iterable than a stdClass object?