> On 23 Apr 2019, at 19:32, Benjamin Morel <benjamin.mo...@gmail.com> wrote: > > I'm sorry, I still don't understand what the issue with foreach is? As I said > before, the proposed syntax does not aim to be used inside the foreach () > parentheses, but rather as an explicit declaration inside the foreach {} > block. >
And as I said before, I can’t understand how that is supposed to be better than just doing what works now, using instanceof to check the type inside the block: if (! $foo instanceof Foo) { throw new TypeError(…); } At least with the above, it’s obvious what is happening. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php