svn: /phpdoc/en/trunk/reference/math/functions/ pow.xml

From: Date: Wed, 17 Aug 2011 10:50:30 +0000
Subject: svn: /phpdoc/en/trunk/reference/math/functions/ pow.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-8635@lists.php.net to get a copy of this message
bjori Wed, 17 Aug 2011 10:50:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315057 Log: Sort the changelog properly, kill bogus warning and wrong error return value. fixes bug#55426 Bug: https://bugs.php.net/55426 (Open) pow() claims to return FALSE but actually does not Changed paths: U phpdoc/en/trunk/reference/math/functions/pow.xml Modified: phpdoc/en/trunk/reference/math/functions/pow.xml =================================================================== --- phpdoc/en/trunk/reference/math/functions/pow.xml 2011-08-17 10:49:45 UTC (rev 315056) +++ phpdoc/en/trunk/reference/math/functions/pow.xml 2011-08-17 10:50:30 UTC (rev 315057) @@ -16,12 +16,6 @@ Returns <parameter>base</parameter> raised to the power of <parameter>exp</parameter>. </para> - <warning> - <para> - In PHP 4.0.6 and earlier <function>pow</function> always returned - a <type>float</type>, and did not issue warnings. - </para> - </warning> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; @@ -52,7 +46,6 @@ <parameter>base</parameter> raised to the power of <parameter>exp</parameter>. If the result can be represented as integer it will be returned as type <type>integer</type>, else it will be returned as type <type>float</type>. - If the power cannot be computed &false; will be returned instead. </para> </refsect1> <refsect1 role="changelog"> @@ -68,18 +61,17 @@ </thead> <tbody> <row> - <entry>Since 4.0.6</entry> + <entry>4.2.0</entry> <entry> - The function will now return <type>integer</type> results if possible, - before this it always returned a <type>float</type> result. For older - versions, you may receive a bogus result for complex numbers. + No warning is emitted on errors, even if the value can't be computed. </entry> </row> <row> - <entry>Since 4.2.0</entry> + <entry>4.0.6</entry> <entry> - PHP stops to emit a warning if the value can't be computed, - it will now silently return &false; only. + The function will now return <type>integer</type> results if possible, + before this it always returned a <type>float</type> result. For older + versions, you may receive a bogus result for complex numbers. </entry> </row> </tbody> @@ -108,6 +100,17 @@ </example> </para> </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + This function will convert all input to a number, even non-scalar values, + which could lead to <literal>weird</literal> results. + </para> + </note> + </refsect1> + <refsect1 role="seealso"> &reftitle.seealso; <para>

« previous php.doc.cvs (#8635) next »