ID: 48422 Updated by: ras...@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