php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30570 %f appears to be broken
Submitted: 2004-10-26 22:00 UTC Modified: 2004-10-26 22:04 UTC
From: rbell01824 at earthlink dot net Assigned:
Status: Closed Package: Output Control
PHP Version: 4.3.8 OS: XP home
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rbell01824 at earthlink dot net
New email:
PHP Version: OS:

 

 [2004-10-26 22:00 UTC] rbell01824 at earthlink dot net
Description:
------------
%f inconsistent behavior at odds with docs


Reproduce code:
---------------
      $data1 = 1.3125;
      $data2 = 0.7891;
      $data3 = 12.12345;
      $s = "[[%09.4f]] [[%09.4f]] [[%09.4f]]";
      printf ($s, $data1, $data2, $data3 );

produces

[[0001.3125]] [[000000000.7891]] [[0012.1235]]

either way is fine, but it should really be one or the other

Expected result:
----------------
either way is fine, but it should really be one or the other


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-26 22:04 UTC] derick@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Feb 24 06:01:26 2020 UTC