php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12437 string incrementing is different from before
Submitted: 2001-07-27 18:43 UTC Modified: 2001-07-31 09:23 UTC
From: jcrutch at allofe dot net Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.0.6 OS: Linux RH 7.1
Private report: No CVE-ID: None
 [2001-07-27 18:43 UTC] jcrutch at allofe dot net
when incrementing a numerical string with leading zeros with the '++' operator, the result is different in 4.0.6 than in eariler version of PHP. 

for example:

for($i="01";$i<="10";$i++)
{
  echo $i." ";
}

in 4.0.5 the output was
>>> 01 02 03 04 05 06 07 08 09 10

but in 4.0.6 the output is
>>> 01 2 3 4 5 6 7 8 9 10




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-31 09:23 UTC] andy@php.net
no bug here...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC