|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-27 11:47 UTC] jani@php.net
[2008-10-27 13:27 UTC] David dot Rolli at bl dot ch
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 14:00:01 2025 UTC |
Description: ------------ I want to outpu my floating number with 13 digits but not in scientific notation - this just doesn't work with certain numbers (see code). Reproduce code: --------------- <?php ini_set("precision", 14); $a = 123456789012; $b = 123456789012.0; $c = 12345678901203; $d = 1234567890123.0; $e = 1225099800; $f = 1225099800000; $h = 1225099800001; echo('$a: ' . $a. "<BR>"); // -> 123456789012 echo('$b: ' . $b. "<BR>"); // -> 123456789012 echo('$c: ' . $c. "<BR>"); // -> 1234567890123 echo('$d: ' . $d. "<BR>"); // -> 1234567890123 echo('$e: ' . $e. "<BR>"); // -> 1225099800 echo('$f: ' . $f. "<BR>"); // -> 1.2250998E+12 !!! echo('$h: ' . $h. "<BR>"); // -> 1225099800001 !!! ?> Expected result: ---------------- 123456789012 123456789012 1234567890123 1234567890123 1225099800 1225099800000 1225099800001 Actual result: -------------- 123456789012 123456789012 1234567890123 1234567890123 1225099800 12250998E+12 1225099800001