note 126788 added to function.number-format

From: Date: Fri, 21 Jan 2022 20:29:04 +0000
Subject: note 126788 added to function.number-format
Groups: php.notes 
Request: Send a blank email to php-notes+get-217529@lists.php.net to get a copy of this message
Setting the second argument to a value to greater than what is possible in floating point representation returns some interesting results. <?php $a = 1234.5678; print(number_format($a, 14, '.', '')); // 1234.56780000000003 ?> ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.135 (proxied: 72.94.151.77) ---- Manual Page -- https://php.net/manual/en/function.number-format.php Edit -- https://main.php.net/note/edit/126788 Del: integrated -- https://main.php.net/note/delete/126788/integrated Del: useless -- https://main.php.net/note/delete/126788/useless Del: bad code -- https://main.php.net/note/delete/126788/bad+code Del: spam -- https://main.php.net/note/delete/126788/spam Del: non-english -- https://main.php.net/note/delete/126788/non-english Del: in docs -- https://main.php.net/note/delete/126788/in+docs Del: other reasons-- https://main.php.net/note/delete/126788 Reject -- https://main.php.net/note/reject/126788 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217529) next »