[Bug 251625] [NEW] PHP5-CLI doesn't print floats properly
Jim
info at zoidb.org
Thu Jul 24 21:40:21 BST 2008
Public bug reported:
Binary package hint: php5
PHP5 CLI isn't printing decimals properly.
Example:
<?
$n = array(0,1e-8, 1e-7, 1e-6,1e-5,1e-4,1e-3,1e-2,1e-1, 0.2, 0.3, 0.4, 0.5);
for($i = 0; $i < count($n); $i++){
print $n[$i]."\n";
}
?>
output:
0
1.0E-8
:.0E-8
:.0E-7
1.0E-5
0.0001
0.001
0.01
0.1
0.2
0.3
0.4
0.5
Some of the numbers aren't printed properly, or with a : where a digit should be...
output of php -v
PHP 5.2.4-2ubuntu5.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 23 2008 06:44:49)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
** Affects: php5 (Ubuntu)
Importance: Undecided
Status: New
--
PHP5-CLI doesn't print floats properly
https://bugs.launchpad.net/bugs/251625
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list