From 460fc9bed45f8d1405195016cb19e69a0767bce4 Mon Sep 17 00:00:00 2001 From: Gwynne Raskind <gwynne@php.net> Date: Fri, 15 Jun 2007 01:27:33 +0000 Subject: [PATCH] Clarify return type of division operator. Fixes bug #39703. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237714 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/operators.xml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/language/operators.xml b/language/operators.xml index 026b695381..4f66dba1ec 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.113 $ --> +<!-- $Revision: 1.114 $ --> <chapter id="language.operators"> <title>Operators</title> <simpara> @@ -289,9 +289,9 @@ $a = $b += 3; // $a = ($b += 3) -> $a = 5, $b = 5 </tgroup> </table> <simpara> - The division operator ("/") returns a float value anytime, - even if the two operands are integers (or strings that get - converted to integers). + The division operator ("/") returns a float value unless the two operands + are integers (or strings that get converted to integers) and the numbers + are evenly divisible, in which case an integer value will be returned. </simpara> <note> <simpara> @@ -304,16 +304,6 @@ $a = $b += 3; // $a = ($b += 3) -> $a = 5, $b = 5 <link linkend="ref.math">Math functions</link>. </simpara> - <!-- - <simpara> - The division operator ("/") returns an integer value (the result - of an integer division) if the two operands are integers (or - strings that get converted to integers) and the quotient is an - integer. If either operand is a floating-point value, or the - operation results in a non-integer value, a floating-point value - is returned. - </simpara> - --> </sect1> <sect1 id="language.operators.assignment">