#48422 [Opn->Bgs]: Math sum error
| From: | rasmus@php.net | Date: | Thu, 28 May 2009 23:27:34 +0000 |
| Subject: | #48422 [Opn->Bgs]: Math sum error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-137854@lists.php.net to get a copy of this message | ||
ID: 48422
Updated by: rasmus@php.net
Reported By: fernandokts at msn dot com
-Status: Open
+Status: Bogus
Bug Type: Math related
Operating System: Linux
PHP Version: 5.2.9
New Comment:
You have discovered octal numbers. Not a bug.
Previous Comments:
------------------------------------------------------------------------
[2009-05-28 22:44:37] fernandokts at msn dot com
Description:
------------
When doing simple math, there is a problem with numbers with 2 digits
greater then 07 in sums.
It appears to ignore any numbers starting with a zero that are bigger
then 07.
Reproduce code:
---------------
<?
$calc = 01 + 03 + 05 + 06 + 07 + 08;
echo "The result is: $calc";
?>
Expected result:
----------------
The result is: 30
Actual result:
--------------
The result is: 22
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48422&edit=1