Bug #16946: number_format documentation example problem

From: Date: Wed, 01 May 2002 14:26:47 +0000
Subject: Bug #16946: number_format documentation example problem
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-9965@lists.php.net to get a copy of this message
From: hpdl@oscommerce.com Operating system: documentation PHP version: 4.1.2 PHP Bug Type: Website problem Bug description: number_format documentation example problem The example listed on the number_format page is not taking into account the rounding of the value returned. http://www.php.net/manual/en/function.number-format.php <?php $number = 1234.56; // english notation (default) $english_format_number = number_format($number); // 1,234.56 // French notation $nombre_format_francais = number_format($number, 2, ',', ' '); // 1 234,56 $number = 1234.5678; // english notation without thousands seperator $english_format_number = number_format($number, 2, '.', ''); // 1234.56 ?> The last output should be 1234.57 -- Edit bug report at http://bugs.php.net/?id=16946&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16946&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16946&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16946&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16946&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16946&r=support Expected behavior: http://bugs.php.net/fix.php?id=16946&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16946&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16946&r=submittedtwice

« previous php.mirrors (#9965) next »