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.

Reply via email to