Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128293 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id B1E531A00BC for ; Tue, 29 Jul 2025 11:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753789616; bh=FZAM+KOfJ+NcV0UORHFJkP3Z8VnMWJSFrTS7P4mF4hE=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=Ea/eTZ4on8ICIRy+55r5NLUbRCzm1Nm+IsnPRMUnrBNU8x0ElFAR90xLR2BoHcLUr TsVBQHlB49+Azapdd+JzbsPCQ2F0qQBle8hMcv4VyqrqIVzYspzhWEbn4Yh0JSjo0p S88/fpGaD7Gj06k58UwQf9NMGooNp+eqt4JcnQxPcrGDg49LG6srNVUzqiidEgJpVU uew8COxOSioUviuYeav82iNuu0UGUZO307hyID8+BMFsSa35XJ+yhJ63N9ESuFDP+P yKEgUuNxVBTCP9s6WfWCTeP5pRoIPdhQCy3jHYbpeKf71ht6agTjfn3EJ4nZ4RV7mx Clvpom23zPm/A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D5C631801D4 for ; Tue, 29 Jul 2025 11:46:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 29 Jul 2025 11:46:55 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id DC0DC1400303; Tue, 29 Jul 2025 07:48:37 -0400 (EDT) Received: from phl-imap-05 ([10.202.2.95]) by phl-compute-05.internal (MEProxy); Tue, 29 Jul 2025 07:48:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1753789717; x= 1753876117; bh=FZAM+KOfJ+NcV0UORHFJkP3Z8VnMWJSFrTS7P4mF4hE=; b=U sDNjD0IOItmlbyvzS5X4HchmwS6WbS36uPDQ/nO79B1imrdlNII0fb/vIbgFQlJY J4uoOiKqxTtXAZqKukWu16fid62YPxVs3E54Cvvmp8Z1tscM9oJmq9IbvXWmcIPK oNHDAhGZH7okKLDey/xCJJwssx9ZrIBwnoPviGm2+tpJYGbJwQrTNiV2dR7ZUoxO cfZu9c5lEja9eMyvTSohXKPXAlBH4lCK9nIg0j0lwDaiiG3Fkc93rs17F2bm7zUW LaoGZCLz+WEjtNSg5I2hhATGwr4bgCuwvs3tszEBqxtwuTYZJUgwjXZvzvEOL8vX 2vKInsCBdAOEO+Is1yzew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1753789717; x=1753876117; bh=FZAM+KOfJ+NcV0UORHFJkP3Z8VnMWJSFrTS 7P4mF4hE=; b=EWoqzOM8AciaQhYhQbgQMOL9YM1c08pEVs4rETl2W+DLQ7fFmAU 6tKX8KeMEp4QvjIUTrDUy9GUJHjgjV9UFRhZOzgOiN9cW6d1QkZBD6/lqvitjnmw Ts49Aun7vsoe/Xc0komyh9TkHaWlqLGkLi/7/gDdqBhhIzFSrQ0bXeyOGNPWHkVY MMcqrnFDBrCrR+NMXdG3BCAVLmHgN+ed1BrqGeC08KURBbT1eGTQNdGNI+LzY1g1 Ocr8hthQnOKV0uYRy2FidsU3V+fxVv40n9Tpu6qwXpK8w8I2Lb6ckQssFArujQFd fNTv8+6y9eA3LwUUf2CojDeA5479WEYYNbw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdelgeeljecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenogfuuh hsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefoggffhffvvefkjghfufgtsegr tderreertdejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceorhhosgessghoth htlhgvugdrtghouggvsheqnecuggftrfgrthhtvghrnhephfevteevuefhjeeitdehhfev gedvvdfgudejvedukeffhfehvdfgffegvdelfeffnecuffhomhgrihhnpeefvheglhdroh hrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehr ohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopeegpdhmohguvgepsh hmthhpohhuthdprhgtphhtthhopegurhgvrghlvggtshesghhmrghilhdrtghomhdprhgt phhtthhopehtohhvihhlohdrihhlihhjrgesghhmrghilhdrtghomhdprhgtphhtthhope hinhhtvghrnhgrlhhssehgphgsrdhmohgvpdhrtghpthhtohepihhnthgvrhhnrghlshes lhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 52F4B1820074; Tue, 29 Jul 2025 07:48:37 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T699cdebae00e1fd4 Date: Tue, 29 Jul 2025 13:48:16 +0200 To: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= Cc: "Gina P. Banyard" , "Ilija Tovilo" , "PHP internals" Message-ID: <4af6cdf9-dc2a-483f-95b3-a457aad53f1c@app.fastmail.com> In-Reply-To: References: <3b303d303708b13a2de81dc07753da3a@bastelstu.be> <-EPNf2A21qLIrIyEvNmQxV_tNTa1IO5hU-LHGBhjfnVRB33qiwK3yhVV7AxDKSTDUl9ihRpapZLckSgnCn7t9RvUj9Jbtjnx1VLYqCQO6BI=@gpb.moe> <2338ef4d-e9d3-4b16-9b52-8d343976d06d@app.fastmail.com> Subject: Re: [PHP-DEV] [RFC] Warnings for PHP 8.5 Content-Type: multipart/alternative; boundary=1dc482f42f8e42ab8496beb241111d6c From: rob@bottled.codes ("Rob Landers") --1dc482f42f8e42ab8496beb241111d6c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Jul 29, 2025, at 13:16, Alexandru P=C4=83tr=C4=83nescu wrote: >=20 > On Tue, Jul 29, 2025 at 12:18=E2=80=AFPM Rob Landers wrote: >> __ >>=20 >> I am not sure that (int)"INF" or (int)"NAN" is misbehaving. (int)"Pas= sword" also produces `0`, and these are strings. If we had the time to d= iscuss it properly, I would argue that simply warning when casting a str= ing to int is the most sensible thing, just like we get an error when co= ercing a string to int, which is more consistent across the language tha= n just special casing some strings. >>=20 >>=20 >=20 > This is about INF and NAN, the float values, not the strings "INF" and= "NAN". > https://3v4l.org/fAFn3 >=20 > -- Alex=20 Thanks Alex, I missed that nuance! =E2=80=94 Rob --1dc482f42f8e42ab8496beb241111d6c Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable


On Tue, Jul 29, 2025, at 13:16, Alexandru P=C4=83tr=C4= =83nescu wrote:

On Tue, = Jul 29, 2025 at 12:18=E2=80=AFPM Rob Landers <rob@bottled.codes> w= rote:


I am not sure = that (int)"INF" or (int)"NAN" is misbehaving. (int)"Password" also produ= ces `0`, and these are strings. If we had the time to discuss it properl= y, I would argue that simply warning when casting a string to int is the= most sensible thing, just like we get an error when coercing a string t= o int, which is more consistent across the language than just special ca= sing some strings.



T= his is about INF and NAN, the float values, not the strings "INF" and "N= AN".

-- Alex 
=

Thanks Alex, I missed that nuance= !

=E2=80=94 Rob
--1dc482f42f8e42ab8496beb241111d6c--