php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6808 misbehavior of sprintf and printf
Submitted: 2000-09-18 22:58 UTC Modified: 2000-10-16 11:15 UTC
From: piotrbe at zigzag dot pl Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.2 OS: WinNT 4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 12 = ?
Subscribe to this entry?

 
 [2000-09-18 22:58 UTC] piotrbe at zigzag dot pl
IIS 4.0  + php4isapi.dll + zendopt

$float = "21.37";
printf ("%0.02f<br>",$float);
echo "$float<BR><br>";

------OUTPUT------
21.37<br>
21.37<br><br>

4 hours later (really)

------OUTPUT------
21.00<br>
21.37<br><br>

strange isn't it?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-20 01:49 UTC] stas@php.net
Failed to reproduce here. Did you change anything between runs, in your scripts, or in your Windows?
 [2000-09-20 15:50 UTC] piotrbe at zigzag dot pl
I removed zendoptimizer (rc1) from my ini file, and now seams to be good. I try to reproduce this bug on another server and publish url.
 [2000-09-20 17:30 UTC] piotrbe at zigzag dot pl
I removed zendoptimizer (rc1) from my ini file, and now seams to be good. I try to reproduce this bug on another server and publish url.
 [2000-10-16 11:15 UTC] sniper@php.net
Reopen this bug report if you really can reproduce this..

--Jani
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Nov 27 06:05:54 2022 UTC