Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121240 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81964 invoked from network); 5 Oct 2023 19:57:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Oct 2023 19:57:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1D7A318004A for ; Thu, 5 Oct 2023 12:57:39 -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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 5 Oct 2023 12:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1696535857; bh=jCB5bUqHPLR7H1gBPfXcOHKAW5CmnBbqGEhPOzhjy1A=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=lFvXo60cSE4S4L8eqGcgiPxjSerF4T5cqxZjk+8ROxgqzRQlLnlPLCFe/BSqKNFfl IdGw5DgDE0GSKYoazgW5surmvvLgMNONACHEwcrPpltRwy7elJKJfw83CGJmRWtS+/ IBcyFPpQOvspNdezNuPKUUcurmy8BTsckT2TSBnef57s9VazeSU6uZdRqXYXjLPQ3x 1Q/9Ylc8YYe9Ih5nSd1wXnAVk39Z0hHhL6fUyOyWE2hgRU9D8r1WFC2aeEcF1eXdNg woNWixTSLVSVxcmY6fm1NJgiebXqyS6Qk1zDqUPRFOqv6/eIuThxQiDOEzBwCKoBTe SdLqrq7VxFXCg== Message-ID: Date: Thu, 5 Oct 2023 21:57:36 +0200 MIME-Version: 1.0 Content-Language: en-US To: internals@lists.php.net References: <27a9b151-09d7-d5ea-bc0b-c85f8ab0e4ee@mabe.berlin> <6ae95177-e0f3-491c-015b-8275f572fb4d@bastelstu.be> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] [Discussion] Rounding Integers as int From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 10/4/23 08:35, Marc Bennewitz wrote: > As far as I understand you are in favor of option 1. (considering it a > bugfix) but how do you make sure this will not lead to different > application behavior overlooked on upgrading? Also there is no way to > opt-in new behavior. > Yes, I would be in favor of option 1 and I don't even see a reason not to do this in PHP 8.4 right away. As I mentioned before, this effectively can be considered a bug fix: PHP does not correctly round integers > 2^53. While this is not a bug fix that is appropriate for the current stable branches, I don't see why it would not be appropriate for PHP 8.4 if there's an RFC for it. In fact there is already a rounding bugfix (no RFC for that) in PHP 8.4: https://github.com/php/php-src/blob/65a8c70f93ccb7e008de147cd4c357681c653bd0/UPGRADING#L75-L82 While PHP tries hard to keep backwards compatibility within a given major, keeping full compatibility is effectively impossible for the huge API surface PHP exposes. Every version includes *some* changes that are technically breaking for one reason or another. Best regards Tim Düsterhus