note 108559 added to function.bccomp

From: Date: Mon, 07 May 2012 01:19:56 +0000
Subject: note 108559 added to function.bccomp
Groups: php.notes 
Request: Send a blank email to php-notes+get-187497@lists.php.net to get a copy of this message
You can wrap this function with version_compare() to have support for operators and friendlier (boolean) return values. <?php function _bccomp($a, $b, $operator = '=') { return version_compare(bccomp($a, $b), 0, $operator); } var_dump(_bccomp(5, 3, '>=')); // true ?> Still works with arbitrary length numbers. ---- Server IP: 194.8.30.16 Probable Submitter: 95.136.100.108 ---- Manual Page -- http://www.php.net/manual/en/function.bccomp.php Edit -- https://master.php.net/note/edit/108559 Del: integrated -- https://master.php.net/note/delete/108559/integrated Del: useless -- https://master.php.net/note/delete/108559/useless Del: bad code -- https://master.php.net/note/delete/108559/bad+code Del: spam -- https://master.php.net/note/delete/108559/spam Del: non-english -- https://master.php.net/note/delete/108559/non-english Del: in docs -- https://master.php.net/note/delete/108559/in+docs Del: other reasons-- https://master.php.net/note/delete/108559 Reject -- https://master.php.net/note/reject/108559 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187497) next »