|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-05 15:55 UTC] andrey at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 00:00:02 2025 UTC |
Here's a script that reproduces the problem. The first output shows the bug, as far as I can see. The second output shows how it should be. If you look at the output, the problem only occurs during the first few numbers in a sequence which makes me think it's a bug. ie, 0, 1, 2 come out as 00, 01, 02, while 3 on up (until 100, where the bug reoccurs) come out as 003, etc. The only modules I have configured in are gd and mysql. PHP is running as an Apache (1.3.3) module. <? for($loop=0; $loop <110; $loop++) { $tmpidx="000$loop"; $orig=$tmpidx; $tmpidx=substr($tmpidx, strlen($tmpidx-3), 3); echo "$loop: $tmpidx ($orig)<BR>\n"; } ?> <HR> <? for ($loop=0; $loop <110; $loop++) { $tmpidx="00$loop"; $orig=$tmpidx; $tmplen=strlen($tmpidx)-3; $tmpidx=substr($tmpidx, $tmplen, 3); echo "$loop: $tmpidx ($orig)<BR>\n"; } ?>