note 49914 added to function.bccomp

From: Date: Fri, 11 Feb 2005 22:03:10 +0000
Subject: note 49914 added to function.bccomp
Groups: php.notes 
Request: Send a blank email to php-notes+get-84872@lists.php.net to get a copy of this message
Note that the above function defeats the purpose of BCMath functions, for it uses the 'conventional' < operator. Instead, it should be: <?php function my_bccomp_zero($amount, $scale) { if (@$amount{0}=="-") { return bccomp($amount, '-0.0', $scale); } else { return bccomp($amount, '0.0', $scale); } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.bccomp.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49914 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49914&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49914&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49914&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49914&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49914&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49914&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84872) next »