Re: Fix division by zero to throw exception (round 2)
| From: | S.A.N | Date: | Sat, 04 Jul 2015 23:53:21 +0000 |
| Subject: | Re: Fix division by zero to throw exception (round 2) | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87022@lists.php.net to get a copy of this message | ||
> You ideally just check if the divisor is 0 and then do the operation.
> And at that point, we should just throw the DivisionByZeroError.
>
> Honestly, a warning is just the wrong thing to use. Either you enable it (like double division
> in C) or disable it completely (runtime exception in C).
>
> I can get behind both, but not behind a warning.
+1