|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-09-21 03:06 UTC] leroy at twisp-e dot com
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?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 19:00:02 2025 UTC |
I figured out the problem. I was echoing the output of printf. using echo printf("%07d",$value) gives 00value7 using printf("%07d",$value)gives 00value Sorry.