note 22375 added to function.round
| From: | carlos@php.net | Date: | Sat, 15 Jun 2002 14:08:38 +0000 |
| Subject: | note 22375 added to function.round | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31885@lists.php.net to get a copy of this message | ||
Seems there's a bug in php 4.1.2's round() as:
echo round(12.555, 2);
produces "12.55" not "12.56" as expected.
echo round(12.556, 2);
works fine (and gives "12.56")
--
http://www.php.net/manual/en/function.round.php
http://master.php.net/manage/user-notes.php?action=edit+22375
http://master.php.net/manage/user-notes.php?action=delete+22375
http://master.php.net/manage/user-notes.php?action=reject+22375