On Thu, Sep 26, 2019 at 4:31 AM Christian Schneider <cschn...@cschneid.com>
wrote:

> Am 26.09.2019 um 09:41 schrieb Nikita Popov <nikita....@gmail.com>:
> > * Remainder: 54 yes, 3 no. Accepted with 95% majority.
>
> Just for the record:
> The one I'm most concerned about here is the foreach on undefined
> variables throwing an exception.
> While this was already promoted to a warning at an earlier stage it still
> allowed a program to finish with a well-defined result (looping over
> nothing does nothing).
> Now this code will stop with an Exception and possibly won't produce its
> output.
>
> I agree. At the very least, I'd propose that null (and ideally false) NOT
throw an exception. There are enough instances of methods that return one
of those values when there is no data (so, not an error situation) but an
array when there is.


> I noticed this before the vote but as the mailing list was already flooded
> with the 'undefined variables' discussion I feared that there was no place
> to bring this up without getting personally attacked like I was for the
> undefined variables stuff.
>
> Thanks for bringing this up. I think this should be noted in relation to
the other RFC currently out there. Those of us speaking out against this
RFC are the ones being held up as examples of why that RFC is needed, which
this statement actually shows that it was those in favor of the RFC that
were behaving in a way that intimidated others and made them feel reluctant
to contribute.


> Anyway, the vote is done, I said my piece and will shut up about it now,
> - Chris
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
Chase Peeler
chasepee...@gmail.com

Reply via email to