Bug #10002 Updated: sprintf() and floating point

From: Date: Tue, 15 Jan 2002 17:33:46 +0000
Subject: Bug #10002 Updated: sprintf() and floating point
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-77150@lists.php.net to get a copy of this message
ID: 10002 Comment by: pgerzson@freestart.hu Old Reported By: bmr@comtime.com Reported By: pgerzson@freestart.hu Status: Open Bug Type: Strings related Operating System: Debian PHP Version: 4.1.1 New Comment: I played with ini settings (to be frank remove the php.ini), and now examples work fine. Previous Comments: ------------------------------------------------------------------------ [2002-01-09 16:43:39] gerzson@php.net I'd like to reopen it. Visit the page: http://213.134.22.60/~gerzson/sprintf.php ------------------------------------------------------------------------ [2002-01-09 16:36:36] pgerzson@freestart.hu I'm sorry to say that I experienced similar misbehaviour with PHP 4.0.6 and 4.1.1, too. I'm pulling aggregated statistics from database and display it. I'm currently working on minimize a test case, please wait. Till then, visit this link: http://213.134.22.60/~gerzson/sprintf.php this is a very simple test script with a show_source() and phpinfo(). I think this bug should be reopened. ------------------------------------------------------------------------ [2001-03-27 12:30:21] derick@php.net Patch applied, but it's still a strange thing. ------------------------------------------------------------------------ [2001-03-27 08:32:14] zeev@php.net I can't reproduce it under RH 6.2. Generally the fix isn't supposed to do anything (since arg is a double, 10 should be converted to a double automatically), but the fix can't hurt anything so if it works around a compiler bug, it's fine. PHP cannot use sprintf() because sprintf() works with C types with predefined types for the arguments, whether PHP has its own types, and autoconverts arguments to match the format string. ------------------------------------------------------------------------ [2001-03-26 17:19:30] derick@php.net This bug is in 4.0.5RC2 too, just confirmed it ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=10002 Edit this bug report at http://bugs.php.net/?id=10002&edit=1

« previous php.dev (#77150) next »