Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121173 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20414 invoked from network); 29 Sep 2023 15:28:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Sep 2023 15:28:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6576718004A for ; Fri, 29 Sep 2023 08:28:33 -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 ; Fri, 29 Sep 2023 08:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1696001310; bh=Fnts8GqUHFUAlW2IATAVGCypuJlX5UTildh2Ep3/L5g=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=ZjdGfo8ZJMtOyzKmI9wd9bUscF+z3eKrOzdtrvYjtaT9NbY4ZFFozRUiYZnr2jPhV 2DdZBr7rhwtVkQL6qIlf8I8zdu37tGiv7gBLbS5HTP1c13QuvU+1nlnLNKsKcaKAp/ iNpQynUu0P/AkC2//Ix126HS7w6j5Zi9gLadBpho5RuFcGnS2goMtl9ybscaSiARVK OHe979CzaNjP+G4+5zzk9FjqB/uOQiemzb6Ly8fwf6lwvX1RQHDzp9xMOWQWrBfUfa x0bKI0Ml5XJab+f3Uo21er2HZuTXbGVjaqVsKPYqCXtBuNLwLCeW9nJW3WKsld1K55 LwW8fhbf3q0lA== Message-ID: Date: Fri, 29 Sep 2023 17:28:28 +0200 MIME-Version: 1.0 To: Marc Bennewitz , PHP internals References: Content-Language: en-US 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 9/26/23 12:39, Marc Bennewitz wrote: > I'd like to put a new RFC under discussion: > https://wiki.php.net/rfc/integer-rounding I find the proposal reasonable, but I don't like the deprecation proposal, because it does not allow me to opt into the *new* behavior before PHP 9.0 arrives. Getting rid of the deprecation would also require me to either add a cast everywhere or add the error suppression operator everywhere and then revert that with PHP 9 depending on whether I want the new behavior or not. As far as I can tell all the other deprecations allow me to use the replacement functionality right away without needing to go through a two-step process. As the results of not casting to float first are arguably more correct, perhaps this could be considered a bugfix. While it would cause breakage for users that rely on strict types, obtaining the old behavior is just one `(float)` cast away. Best regards Tim Düsterhus