Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90024 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25271 invoked from network); 5 Jan 2016 00:43:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2016 00:43:31 -0000 Authentication-Results: pb1.pair.com header.from=mark@lange.demon.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mark@lange.demon.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lange.demon.co.uk from 91.221.168.50 cause and error) X-PHP-List-Original-Sender: mark@lange.demon.co.uk X-Host-Fingerprint: 91.221.168.50 mdfmta009.mxout.tbr.inty.net Received: from [91.221.168.50] ([91.221.168.50:38832] helo=smtp.demon.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/E3-07292-1B11B865 for ; Mon, 04 Jan 2016 19:43:30 -0500 Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id 1706F384089 for ; Tue, 5 Jan 2016 00:41:27 +0000 (GMT) Received: from mdfmta009.tbr.inty.net (unknown [127.0.0.1]) by mdfmta009.tbr.inty.net (Postfix) with ESMTP id E36F2384087 for ; Tue, 5 Jan 2016 00:41:26 +0000 (GMT) Received: from [192.168.1.64] (unknown [86.135.237.93]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mdfmta009.tbr.inty.net (Postfix) with ESMTP for ; Tue, 5 Jan 2016 00:41:26 +0000 (GMT) To: internals@lists.php.net References: <5686641B.5020209@lange.demon.co.uk> Message-ID: <568B11AF.5070806@lange.demon.co.uk> Date: Tue, 5 Jan 2016 00:43:27 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-MDF-HostID: 4 Subject: Re: [PHP-DEV] Re: Additional Rounding modes for the round() function From: mark@lange.demon.co.uk (Mark Baker) On 04/01/2016 17:12, Andrea Faulds wrote: > 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? > Thanks for the feedback. I see where you're coming from, though I'd chosen to use PHP_ROUND_UP/DOWN precisely because of the two existing constants PHP_ROUND_HALF_UP/DOWN to provide a degree of naming consistency. That being said, it's simple enough to change the names of new flag constants; but I'll wait a couple of days to see if anybody else weighs in with an opinion before updating the PR. -- Mark Baker _________ |. \ \-3 |_J_/ PHP | || | __ | || |m| |m| I LOVE PHP