On Thu, Sep 26, 2019 at 9:41 AM Nikita Popov <nikita....@gmail.com> wrote:

> On Thu, Sep 12, 2019 at 2:17 PM Nikita Popov <nikita....@gmail.com> wrote:
>
>> Hi internals,
>>
>> I've opened the vote on //wiki.php.net/rfc/engine_warnings.
>>
>> There are 4 votes, all of them independent. The first 3 are for specific
>> cases that were controversial during the discussion, the last one is for
>> the remainder of the proposal.
>>
>> Voting closes 2019-09-26.
>>
>
> Voting has closed with the final outcome being:
>
>  * Undefined variables: 36 exception, 18 warning, 10 notice. Exception
> declined with 56% in favor. Warning accepted with 84% combined majority.
>  * Undefined array index: 42 warning, 21 notice. Warning accepted with 2/3
> majority.
>  * Division by zero: 52 exception, 8 warning. Exception accepted with 87%
> majority.
>  * Remainder: 54 yes, 3 no. Accepted with 95% majority.
>
> Regards,
> Nikita
>

This RFC is now mostly implemented. The parts that are still missing are:

 * Switching to DivisionByZeroError. I would like to add an fdiv() function
before doing this and have started a separate thread on the topic.

 * The "Invalid argument supplied for foreach()" case. Christian Schneider
has requested that this stay as a warning, and personally I'm okay with
doing that. Unlike most of the other exception promotions, this one won't
result in any VM simplifications/optimizations and I don't have a very
strong reason to make it an exception. Does anyone else feel strongly about
this?

 * The "Undefined array index" case. This one passed the vote with an exact
2/3 majority, so I'm a bit uncomfortable making changes here. This is also
the only case where convincing usability concerns have been brought
forward, primarily around the $array[$key]++ example. I'm not yet decided
on what to do here and whether we should pursue additional library or
language features first.

Nikita

Reply via email to