Re: Round

From: Date: Wed, 29 Aug 2007 15:20:44 +0000
Subject: Re: Round
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-261455@lists.php.net to get a copy of this message
Koen van den Boogaart wrote:
Is it expected behaviour that <?php var_dump( round(-0.26) ); ?> outputs float(-0)
Yes. You (probably) want: <?php
    var_dump(round(-0.26, 1));
?> http://uk.php.net/manual/en/function.round.php -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support

« previous php.general (#261455) next »