#30176 [NEW]: decimal printf output - padding error
| From: | leroy at twisp-e dot com | Date: | Tue, 21 Sep 2004 01:06:17 +0000 |
| Subject: | #30176 [NEW]: decimal printf output - padding error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-66473@lists.php.net to get a copy of this message | ||
From: leroy at twisp-e dot com
Operating system: w2k
PHP version: 4.3.8
PHP Bug Type: Output Control
Bug description: decimal printf output - padding error
Description:
------------
Is this a bug? PHP 4.3.8
printf("%07d", $value) produces "00value7"
e.g., if $value=123 , output is "00001237"
I expected "00value"
printf("%06d", $value) produces "0value6"
I expected "0value"
Am i missing something here?
--
Edit bug report at http://bugs.php.net/?id=30176&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30176&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30176&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30176&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30176&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30176&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30176&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30176&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30176&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30176&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30176&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30176&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30176&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30176&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30176&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30176&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30176&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30176&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30176&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30176&r=mysqlcfg