com php-langspec: Clarify DivisionByZeroError applicability: spec/14-classes.md
[email protected] (Stanislav Malyshev) Fri, 01 Jan 2016 22:45:06 +0000
| Newsgroups | php.standards.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 634b09d988c2f3716e50b2738fa5f202b724ba79 Author: Stanislav Malyshev <[email protected]> Fri, 1 Jan 2016 14:45:06 -0800 Parents: ba565e9ccedd9612c9cdd2b3e414ab9502b83c01 Branches: master Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=634b09d988c2f3716e50b2738fa5f202b724ba79 Log: Clarify DivisionByZeroError applicability Changed paths: M spec/14-classes.md Diff: diff --git a/spec/14-classes.md b/spec/14-classes.md index e03f3cd..7d7328f 100644 --- a/spec/14-classes.md +++ b/spec/14-classes.md @@ -2065,7 +2065,9 @@ class AssertionError extends Error ####Class `DivisionByZeroError` -An instance of this class is thrown when an attempt is made to divide a number by zero using the remainder operators ([`%`](10-expressions.md#multiplicative-operators) and [`%=`](10-expressions.md#compound-assignment)). The class type is defined, as follows: +An instance of this class is thrown when an attempt is made to divide a number by zero, e.g. when using the remainder operators ([`%`](10-expressions.md#multiplicative-operators) and [`%=`](10-expressions.md#compound-assignment)). +Note that this happens only for integer operations, float division produces `float(INF)` and a non-fatal error instead. +The class type is defined, as follows: ```PHP class DivisionByZeroError extends Error