Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89995 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40720 invoked from network); 4 Jan 2016 17:12:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2016 17:12:07 -0000 X-Host-Fingerprint: 2.218.134.247 unknown Received: from [2.218.134.247] ([2.218.134.247:6294] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/C5-07292-6E7AA865 for ; Mon, 04 Jan 2016 12:12:06 -0500 Message-ID: To: internals@lists.php.net References: <5686641B.5020209@lange.demon.co.uk> Date: Mon, 4 Jan 2016 17:12:01 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <5686641B.5020209@lange.demon.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 2.218.134.247 Subject: Re: Additional Rounding modes for the round() function From: ajf@ajf.me (Andrea Faulds) Hi Mark, Mark Baker wrote: > I'd like to suggest a couple of additional options for the round() > function, two new flags for PHP_ROUND_UP and PHP_ROUND_DOWN; which are > similar to the existing ceil() and floor() functions, but allow a > precision argument as well. > > The PR is at https://github.com/php/php-src/pull/1658 > This seems like a sensible addition. That said, I'm not sure about those names, I think they might get confused with PHP_ROUND_HALF_UP/DOWN. Perhaps name them PHP_ROUND_CEIL and PHP_ROUND_FLOOR, or so? Or PHP_ROUND_ALWAYS_UP/DOWN? Not sure if it matters. Thanks! -- Andrea Faulds https://ajf.me/