Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116755 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 86415 invoked from network); 2 Jan 2022 05:16:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Jan 2022 05:16:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 922231804C3 for ; Sat, 1 Jan 2022 22:22:57 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 1 Jan 2022 22:22:57 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id i11so38668814ljm.13 for ; Sat, 01 Jan 2022 22:22:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FPV4UzBmbHS9cSOJO6whxtupm5TTt8/rzrqX3MKD7Dg=; b=RtmPeJKccv2f8yGe0sYTkpZKjboGLfnCheeIdyLz6qLdCHTuZ58E14KdZaLSscKzLr fyNfn5eTxHoQiilFYsdjarjKtSZaPLPD3DYvJlOXh+r0OaVtgLjhLNNHZ6/TngtShOId 6yVqlLhdVcgk+ebHgfgl7yoKTFSR2kJag5Zy2JiQDNsl8FisAc4xmKPe0UdGERkuZB2X /GW7uhwJ3O1cOAon29/Ex9rrptjH2t1UjfZpgAOwhZAMZIRmkwG095QW1tV6Msq6x6Ht L8gaKvBxv1VmUmh6/4Q5HEWsWeoN1VPqe8I0pCdS7M6I2c6bxfx0iakP+qTa7H8hdByt h3iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FPV4UzBmbHS9cSOJO6whxtupm5TTt8/rzrqX3MKD7Dg=; b=YiG4QZPNLFJ0dmJChJ02aomjRRGlyoJM9FdLQU4Px0XzE7LDz37SCAcT061hLYnpvZ Yz9mEIbMKRtwqEiHO2HEdVcK14c9VRBwzGtaft3TKXQLpedjPVB4VCnmnpIUdJXk3c9B aSS4IAZ8N/hEI/SUM417GxoETKZg8J3d2i4vX3a/Xpaousts1fxXAq5OtZjoGFN+Omx+ xwKlHiHWHFBbBTPoweo02pLtO6anZQzIiNKCZC+MzsNLZEndoj4z/ehuSv3OnwVyZwH0 l5YqtksqhbopqIuN8lhyKOMf1fQ3X4Y1EgIzobkAe03b4JKUz8xpo2uK5CY7pH4JyOKX C9YA== X-Gm-Message-State: AOAM531GOU989Y9ncvUH2prm/bP2XDRnlm2z27YnV0322WzzhrRZs1yu 1seAzU0tEDBZT7PjZpjeV/vIz33MxLiTBcNIi8U= X-Google-Smtp-Source: ABdhPJy93ieMjHu6Txyml2gIapLOd0FnYtHwpe1OhPRy453Xc4Nv0UMn1+URH398XcXjWXVz4CyoyQnlLmLSAlbTEVM= X-Received: by 2002:a2e:bf20:: with SMTP id c32mr34021970ljr.53.1641104575455; Sat, 01 Jan 2022 22:22:55 -0800 (PST) MIME-Version: 1.0 References: <1640910093.890171965@f721.i.mail.ru> <1641095231.967164658@f750.i.mail.ru> In-Reply-To: Date: Sat, 1 Jan 2022 22:22:33 -0800 Message-ID: To: Michael Morris Cc: Kirill Nesmeyanov , internals Content-Type: multipart/alternative; boundary="00000000000042658405d4936fa8" Subject: Re: [PHP-DEV] RFC: Stop to automatically cast numeric-string to int when using them as array-key From: jordan.ledoux@gmail.com (Jordan LeDoux) --00000000000042658405d4936fa8 Content-Type: text/plain; charset="UTF-8" On Sat, Jan 1, 2022 at 9:20 PM Michael Morris wrote: > I leave the decision making to the maintainers and contribs who do the > actual work. Hell, I personally don't even use PHP that much these days > having gotten a job where I focus on writing Cucumber tests in JavaScript > that run on node.js. I keep up with PHP and this list though cause one > never knows what the next job will entail. I just dropped out of lurk mode > to underscore along with others up thread the massive ramifications of what > is being proposed. As someone who wrote stupid code I can see this > breaking, tread lightly. And hell, I don't even know how much of that code > is still in use since I've changed employers many times since it was > written. This situation is not unique and can create huge headaches for > companies running projects on legacy code bases. > I think a question worth asking is how much of that code is likely to actually run on PHP X.X if this were done. I don't have an answer to that, but the kind of code that you're talking about is likely to encounter other more fundamental problems. For instance, prior to 8.0, doing `$var = $obj + 2` would result in `$var = (int)3;` In PHP 7 this also produced a notice. In PHP 8, the same line results in a fatal error. I don't think that the impact would be limited to code that is written poorly however. There may be code which almost accidentally depends on this behavior that is in fact well maintained, since it is such a nuanced problem. To me, this seems like something worth doing, but it might be something that should wait for a major version. Jordan --00000000000042658405d4936fa8--