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
 [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-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 11:01:23 2020 UTC