Bug 203378 - PHP *printf() %f formatting problems
PHP *printf() %f formatting problems
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2006-08-21 11:52 EDT by Eric J. Christeson
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-05 13:48:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eric J. Christeson 2006-08-21 11:52:33 EDT
Description of problem:

php 4.3.2
printf() float formatting is incorrect.

How reproducible:
Actual results:

Expected results:

Additional info:
This is fixed in php 4.3.7  The PHP changelog for 4.3.7 didn't list any apparent
fixed bugs that would correct this, but had this comment:

Fixed problems with *printf() functions and '%f' formatting. (Marcus)
Comment 1 Joe Orton 2006-12-05 13:48:20 EST
Thanks for the report.  Unfortunately to fix this would be an interface change
which would result in output changes to sites which rely on the current
behaviour, so is not a change which could be made in a RHEL update.

In case it's not clear, the 4.3.2 behaviour was to count only the length of the
integer part towards the field width; so the workaround is to use a field width
specifier N smaller than desired where N is equal to precision + 1 (1 for the
radix).   It is appreciated that it is awkward to use such a workaround for PHP
code designed to be portable across multiple versions of PHP.

Note You need to log in before you can comment on or make changes to this bug.