Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129893 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 EFFF41A00C9 for ; Fri, 23 Jan 2026 14:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769180173; bh=2atQ9dguCV/Qw2HVKPSVwG36L/pbOS6zUh4mQ5TyaOs=; h=Date:Subject:To:References:From:In-Reply-To:From; b=e9MfoO1xBGP9JoLh0ua6Bj9C76kXHynh68J0WtzW53lrfErkX/uQqJroWoMWLp25z LEvX08ljUD5UP3Uy6zOishq6+f0/eo/Zi45vhkt8pOShzGgH6AqTTYQ6+t/pX9ZSpV ++zewF5zCZKMyc319tAJzBcIzt0OGIbHwcFG/NgcMradn45T/mgeqqBanPCwI+f/hG r6SN6cnpP4LTTjcobIR+FYVioXhXVV8J67Hi6Ynt+wGKihsyLdYVyaT6OQvRyh361D S9jEOvAzm6NpGyA642tlbDqM/8a4kei2SfVNkwaOkwMgMGoWCsaA5nhngS8oZKEVWI U3VHJYge9ABuQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 93FAD180547 for ; Fri, 23 Jan 2026 14:56:11 +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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-108-mta3.mxroute.com (mail-108-mta3.mxroute.com [136.175.108.3]) (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 ; Fri, 23 Jan 2026 14:56:09 +0000 (UTC) Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta3.mxroute.com (ZoneMTA) with ESMTPSA id 19beb5ae8230009140.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 23 Jan 2026 14:56:02 +0000 X-Zone-Loop: 076e9175ec1bba628426b095593ebcbd2e6e8e250bc6 X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sandfox.me; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:MIME-Version:Date:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=r40+97ySCXwMqTmkggccBykU51HH7+Nya2MJJ2kjUno=; b=j9cclMJn5ULaS7ESTOZu230L7b CoTnLlCOO/HsRzDXH18U0zvQHDrajXqHM4bAZLJx2YYa2NpI1jIXIk8PJQbLSZONgYFTPDHOvdRHl nPo5v9yBfI76efK/gC7LFIicgKkiBQyNf4VhLmvn+SXlvJLfQyywroIBFoHklfsQDPT+aXpbCYoeM 0TLwRvfSJnkpUJhSVOh1K78RFC+Hi91IIib/oGm8/WGRn7afosOZ8ndJkL0vSqbdk8lVnE3cFU6hE Y8fSyiJunzw+vFOnNjcdLfhWhk3fUOk24MGE5cWepsJKgtRQibsxGiyUn3f9NwP/hfZ3hU9llAxZr Yqo5Ny/w==; Message-ID: <31563ed1-ac44-47ef-9fca-3ebbfc567ba5@sandfox.me> Date: Fri, 23 Jan 2026 16:55:58 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Deprecate Fuzzy Type Casts and Allow Stringable in Strict Mode To: internals@lists.php.net References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-Id: sandfox@sandfox.me From: sandfox@sandfox.me (Anton Smirnov) On 23/01/2026 16:17, Alexandre Daubois wrote: > I understand the concern about legacy code. However, if code relies on > `(int) "123abc"` silently returning `123`, this represents a data > integrity issue that would benefit from being made explicit. The > deprecation period exists specifically to help identify and address > these cases. Hi, Alexandre While I agree that this code likely indicates some form of broken logic, this code still needs a clear migration path, so introducing something like fuzzy_int() function with the old behavior I'd say is expected. Second, there should be a time frame where an old and a new way can coexist so deprecating it in 8.x feels a bit rushed. To me a perfect migration would be something like 8.6: introduce fuzzy_int or even a family of functions (fuzzy_float?) 9.1: deprecate 10.0: TypeError -- Anton