Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120769 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13191 invoked from network); 9 Jul 2023 16:46:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Jul 2023 16:46:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 996AA180339 for ; Sun, 9 Jul 2023 09:46:16 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS34011 80.237.132.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wp160.webpack.hosteurope.de (wp160.webpack.hosteurope.de [80.237.132.167]) (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 ; Sun, 9 Jul 2023 09:46:15 -0700 (PDT) Received: from [2a02:8109:9d40:1d44:40b6:f5d3:c567:d46c]; authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1qIXY5-0004DU-MR; Sun, 09 Jul 2023 18:46:13 +0200 Message-ID: <988fd65b-3c97-2eab-91b5-fe743f62124c@mabe.berlin> Date: Sun, 9 Jul 2023 18:46:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: internals@lists.php.net Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;marc@mabe.berlin;1688921176;e214be27; X-HE-SMSGID: 1qIXY5-0004DU-MR Subject: number_format integer + overflow From: marc@mabe.berlin (Marc) Hi internals, As commented in thread of "rounding integers" [1], I have opened a PR [2] for fully supporting formatting integers using "number_format" without any precision loss. Additionally, on working on it, I noticed a possible integer overflow on |$decimals |argument of the current function. As this is at least an internal API break I have opened a separate PR [3] as fix. I hope for these PR's no RFC is required as it does not break PHP API. Any objections? [1] https://externals.io/message/120373 [2] https://github.com/php/php-src/pull/11584 [3] https://github.com/php/php-src/pull/11649