Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120856 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11816 invoked from network); 21 Jul 2023 19:26:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Jul 2023 19:26:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C7E61804DF for ; Fri, 21 Jul 2023 12:26:21 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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:26:21 -0700 (PDT) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2b700e85950so33043941fa.3 for ; Fri, 21 Jul 2023 12:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689967579; x=1690572379; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xgSHOST8KMDtuQo3/35Ro8M69LKrTWZopSyb2Y20wyQ=; b=Kcx3nJUc+BF6yjrMeqyQ83Zh4dtWGya0EU2ptMlfbbJSd0AVG0qkSi5F4WNKaGst2g /1CJblRlqk5VkH7ljJ8P41N0w9nnpwMNsy3/iz/kz7ZkxeunZTFeu07YroTWA3FnmITS ebiTEVf2K03HxeLBDQRJDq/p5oVRi1s0hMUOzHYsIbSjaBjf2vEPB9jEPxwyz5tYCEV9 fsfs9K5LUUUqNNFNU9JWi59mf39V9kR4YCVzXW8pacxG36rk3yvtB4JlfIGKlFiOOoKF DW3Sn9W61D0hMYc6ZaXOzGm7z6rPdxuxAV50nvcb2TktFImpCCttQYSJym+g5NSu8R5O pYrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689967579; x=1690572379; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xgSHOST8KMDtuQo3/35Ro8M69LKrTWZopSyb2Y20wyQ=; b=ikxjyGNazVZBBms0hxfE3cafBcQ3mukmnyhVSp+JdZywbwa/QKidLvkVfbf07Ftm23 wiHvtMrBz2mD2lnGmQpKIlFnJB6L/vwhPZnG/SAuXv6EUywJ54FuHEV6XdyP06VRBeKc t7SkjnbjNCePYBtDuU/Tv3ELZkBLO1u2sVdh5+dMOBDmMK7fLwnhnRHumPbte5F5xwgx UMwLR69UuL99i8Os1GOtIx0dREOppLdBGCHmZFtMeNJp2Sdytfnr5OX+ykB2wqKg4JdH uYowZqY4UVEFiWMVqVuoeIqseFOMExbG+y/zH6EdtyORQ6vAeQFuZdhUs/Zw90D8VpQb SnqA== X-Gm-Message-State: ABy/qLZlQBrV7rhEKkTZw2yweEZUDbbQStDQ4gvKdbNXUBL4Asy8r9A4 Tv+UDXIhTmlUeNgYA7PBnKHiruHBSuFjJgvp3q1etEJFKZg= X-Google-Smtp-Source: APBJJlGeXTYq53J1UkhWeyiO3B2cOr4FtM4N0o0mZhFLI2iNLUxH2uaaMo9fgSZ/zf9pwAKqAxTvmc4bynPgnPRecbI= X-Received: by 2002:a2e:6a04:0:b0:2b6:f21a:3dae with SMTP id f4-20020a2e6a04000000b002b6f21a3daemr2275787ljc.44.1689967578848; Fri, 21 Jul 2023 12:26:18 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 21 Jul 2023 21:26:07 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000003823780601043df2" Subject: Introducing 2 new modes to round function From: jorg.sowa@gmail.com (Jorg Sowa) --0000000000003823780601043df2 Content-Type: text/plain; charset="UTF-8" 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 --0000000000003823780601043df2--