|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53308 base_convert having issues with leading zeros
Submitted: 2010-11-14 07:36 UTC Modified: 2010-11-14 07:43 UTC
From: phoenix at ailesdefeu dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.3SVN-2010-11-14 (SVN) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
1 + 6 = ?
Subscribe to this entry?

 [2010-11-14 07:36 UTC] phoenix at ailesdefeu dot com
base_convert having issues with leading zeros

Test script:
echo base_convert(82000,10,16);
echo base_convert(082000,10,16);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-14 07:37 UTC]
-Status: Open +Status: Bogus
 [2010-11-14 07:37 UTC]
What do you mean?  Numbers with leading 0's are octal, so 082000 is not a valid 
 [2010-11-14 07:43 UTC] phoenix at ailesdefeu dot com
If that's intended please disregard.

Just struck me it calculates '082000' and 82000  to the same value but not 082000.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 07:01:35 2024 UTC