#40482 [NEW]: Sprintf format specifier "e" output modification

From: Date: Wed, 14 Feb 2007 12:44:18 +0000
Subject: #40482 [NEW]: Sprintf format specifier "e" output modification
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108865@lists.php.net to get a copy of this message
From: kore@php.net Operating system: Linux 2.6.20 PHP version: 5.2.1 PHP Bug Type: Output Control Bug description: Sprintf format specifier "e" output modification Description: ------------ There is no real category for sprintf() or string functions issues, I hope the selected one fits the issue. Between PHP 5.2.1 RC1 and PHP 5.2.1 the resulting output with the format specifier "e" changed. All PHP version prior to 5.2.1 tested by me have the same result as PHP 5.2.0. Even the tests were changed to reflect this new behavior: http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/sprintf_f_2.phpt?r1=1.1.2.3&r2=1.1.2.4 Reproduce code: --------------- $ php -r 'var_dump( sprintf( "%.3e", 0.0000234 ) );' Expected result: ---------------- string(7) "2.34e-5" Actual result: -------------- string(8) "2.340e-5" -- Edit bug report at http://bugs.php.net/?id=40482&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40482&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40482&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40482&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40482&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40482&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40482&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40482&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40482&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40482&r=support Expected behavior: http://bugs.php.net/fix.php?id=40482&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40482&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40482&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40482&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40482&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40482&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40482&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40482&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40482&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40482&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40482&r=mysqlcfg

« previous php.bugs (#108865) next »