Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120857 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13420 invoked from network); 21 Jul 2023 19:38:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Jul 2023 19:38:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7CE401804DF for ; Fri, 21 Jul 2023 12:38:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Jul 2023 12:38:17 -0700 (PDT) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-56372a369d3so1151993a12.2 for ; Fri, 21 Jul 2023 12:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689968296; x=1690573096; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GfW/mOvWRBhkvIozIbHtKw/QAqVqJ+Yi8TQgqqNkZ3c=; b=r+R/BL4ThAEGVQX+7c+f3aBP9QNUGsQyMKkugTengkRUct3ZhTpxqRW3aDnnfXTXbE fg1x6VoAnjuSL6Ib2xsCqxtyTI5KnoWy1PgNvURJs2d6sxBhrZIN0dMbGYl86qryh1gp wHK0yXrFb7k29VhkZpIanZRs2PRgEl815OLUCvg47Aduq+WFshhdDU7IU0NOfTE3Pwvc VmlepOUYOoyEGEt+RD21QZbw7mQrC355DpccBYIAWRpsnLHz8dqnQ9Cpeqc/lu0gK461 cxVEX5yYDi4ozhp4Wuw/6Peaxto+3w1Nhj/EjlYuFronyIxnCfZcmm9HI8FDludgfbpC rxVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689968296; x=1690573096; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GfW/mOvWRBhkvIozIbHtKw/QAqVqJ+Yi8TQgqqNkZ3c=; b=V7Wgiq03an/u3Y5kY/RqCCVbm1frNVlMQLtFjTl8UaXDDhyoQP+dgG6G+UO0ArOnLa E+F3PW+0/NTYEbQVsldJP7aVNJhzfSUjdwj95lqQG/aSS18LVI4//PwSd079cp91v11D MMMvJLvXF/cSZP0t7dUglT91PF/nET4wGoeyJXpDIdsoXTzCkLCTRCSkZpT6Am5cx2uR VvYu8uLkZP+M73T9XMdt4HAsx0tcyOA1XFo52Cjo2ahqkNoixU3nYIx3I9H1PIoDOT+O lbr/zPLPJwhJxXT1pSG0gvML+dBdNq6SwA21o66jso854Jcehvp+udxfsFembk+zgTr8 7guw== X-Gm-Message-State: ABy/qLb8J06FZunO7N3d4eze8AKPKyzrTLor0uR1ZuivYdFX7C+nDiyh nMNQTX1aoZBZXVvI8F8WjpcUBL5hMWMZ+zjESW4= X-Google-Smtp-Source: APBJJlGU3GbEY9TGrH6yEK01WceNFXA4HT5etEdwJTXKbGEjDNZyWwxXtLiPyfFtmf4rppvR0Z1L6+M4UW9jGW/g+bg= X-Received: by 2002:a17:90b:4382:b0:263:50ec:2f67 with SMTP id in2-20020a17090b438200b0026350ec2f67mr2097943pjb.0.1689968295631; Fri, 21 Jul 2023 12:38:15 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 21 Jul 2023 21:38:03 +0200 Message-ID: To: Jorg Sowa Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000f1629e060104678d" Subject: Re: [PHP-DEV] Introducing 2 new modes to round function From: ocramius@gmail.com (Marco Pivetta) --000000000000f1629e060104678d Content-Type: text/plain; charset="UTF-8" Hey Jorg, What is the reason for using this over these? * https://www.php.net/manual/en/function.ceil.php * https://www.php.net/manual/en/function.floor.php On Fri, 21 Jul 2023, 21:26 Jorg Sowa, wrote: > Hello internals! > > I would like to propose introducing two new modes to the function > `round()`: PHP_ROUND_DOWN and PHP_ROUND_UP. > > Those modes are highly requested as you can see by the comments on round > documentation page. First comment mentioning about those modes has 309 > votes as of today. Introducing those 2 modes would be complementing to the > rounding in this function. > > Round documentation: https://www.php.net/manual/en/function.round.php > My implementation: https://github.com/php/php-src/pull/11741 > > I'm not sure if such minor improvement requires RFC, but as someone may > have some concerns I create this thread to get your feedback. > > Kind regards, > Jorg > --000000000000f1629e060104678d--