Regarding php bug 28633
| From: | satyanarayana | Date: | Wed, 13 Oct 2004 13:40:54 +0000 |
| Subject: | Regarding php bug 28633 | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969364526@lists.php.net to get a copy of this message | ||
Hi,
From the bug 28633, it talks about sprintf incorrectly adding padding to floats. But when checked sprintf() document, i don't see any descriptions on this.
So it would be nice if we can talk about the changes made regarding padding of floats in php 4.3.9 with an example, it would be verymuch helpful I guess.
Below is a an example.
printf('%5.2f', 0.02);
print("\n");
printf('%06.2f', 2.02);
print("\n");
printf('%07.2f', 123);
print("\n");
printf('%1.2f',123.1);
print("\n");
printf('%7.2f',123.1);
print("\n");
will give outpout as
0.02
002.02
0123.00
123.10
123.10
thanks,
Satya.