Bug #53308 [Bgs]: base_convert having issues with leading zeros
| From: | phoenix at ailesdefeu dot com | Date: | Sun, 14 Nov 2010 06:43:34 +0000 |
| Subject: | Bug #53308 [Bgs]: base_convert having issues with leading zeros | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156013@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53308&edit=1
ID: 53308
User updated by: phoenix at ailesdefeu dot com
Reported by: phoenix at ailesdefeu dot com
Summary: base_convert having issues with leading zeros
Status: Bogus
Type: Bug
Package: Math related
PHP Version: 5.3SVN-2010-11-14 (SVN)
Block user comment: N
New Comment:
If that's intended please disregard.
Just struck me it calculates '082000' and 82000 to the same value but
not 082000.
Previous Comments:
------------------------------------------------------------------------
[2010-11-14 07:37:59] rasmus@php.net
What do you mean? Numbers with leading 0's are octal, so 082000 is not
a valid
number.
------------------------------------------------------------------------
[2010-11-14 07:36:31] phoenix at ailesdefeu dot com
Description:
------------
base_convert having issues with leading zeros
Test script:
---------------
echo base_convert(82000,10,16);
echo base_convert(082000,10,16);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53308&edit=1