Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116744 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 16715 invoked from network); 30 Dec 2021 15:48:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Dec 2021 15:48:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6D5B8180089 for ; Thu, 30 Dec 2021 08:54:02 -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-ua1-f41.google.com (mail-ua1-f41.google.com [209.85.222.41]) (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 ; Thu, 30 Dec 2021 08:54:02 -0800 (PST) Received: by mail-ua1-f41.google.com with SMTP id u6so36134222uaq.0 for ; Thu, 30 Dec 2021 08:54:02 -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=Pem9B78T0ebCkU7ztlOVydr/e0BoO4gqODGU1X10J2g=; b=IgD7YVt1YA3Una7ujOv8oqE8h3/IFzQWM3eanQj7yc3pMBKScUDnkeEROTTAhA9jI+ 8nEtkkxv5AGSpKaAOKPbz27Qvp0TZKv0vr1d2YWBMig0UZHUaq++FjrQMsXBWK0uwhdY gcszXNKFbN1RZn1GgI8S/y31I3PLA2vzX6nMUfwexs+rkl4d9vlB/A/HJojXRLWTjr02 7+oVVb05v/429aEzDK9hAYCK0yt2Mlkb8qTNw/YpRhC2wuenFSpHAcUVBTvvV8ftnI8d vUsXrc78xBYpEVXRaagoTCJJhpCTyfp7xarTzTyIXtSjsz0BPRarDLgZMOWhRhzhAkzI +guw== 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=Pem9B78T0ebCkU7ztlOVydr/e0BoO4gqODGU1X10J2g=; b=AEhIHwB8LADw3nWiiHrsmQ2aaGlUVnp1haoNZrnoTnw/fH9fw7QSa4H1TQLu9xi8G2 doeHxayMpRj/lDrjtCFBW7dYYhUEBcdJVei1KKUrBrjka06Net8rx3B9EOvO4PdeUMNo H0eGZLbT8EAUAXFPu42RTTA6OSFRcMl1HJgQZ842faQpnvI7g4YZnSIpDWPJfBho2JiD yyEFN5MJ+mq8dHHMMsjhMWFmvJZcfkzRPm+hDKjvq3iwFnNrgjpjUtzUe8jeog/DOT5s o8gnj4bin493B8BaTjnihbLhU+QMrsZhKQgld3oc+Zk4rKLUzShQJKWy/ORhLxYvptoW wcTg== X-Gm-Message-State: AOAM532xGq/fg6ZQeoZC2rB36xfyEBpObGlS+eCHqOibdti25GVoB/LM fTXNKqOCK/eBG5EKIf7x9zMQhlEK2DB9kXVwgdeR6VX/ud0= X-Google-Smtp-Source: ABdhPJw/Mu2+UKPa6LrvRk48GvjHXDS4a+HQ66/VeLwPGaONmjY1E0WEo+JDzz22HfzU4fx0zKmjWoaZ09DCQFxhQzU= X-Received: by 2002:a05:6102:509e:: with SMTP id bl30mr9195110vsb.43.1640883241536; Thu, 30 Dec 2021 08:54:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 30 Dec 2021 17:53:50 +0100 Message-ID: To: Stanislav Malyshev Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000bacec905d45fe641" Subject: Re: [PHP-DEV] RFC: Stop to automatically cast numeric-string to int when using them as array-key From: mr.vincent.langlet@gmail.com (Vincent Langlet) --000000000000bacec905d45fe641 Content-Type: text/plain; charset="UTF-8" > It'd not be just a BC break, it'd be an absolutely massive BC break that > has a potential to break a ton of code and would be extremely hard to > detect. This is not something that should be changed in an advanced > version of the language. > Would you still consider this as a massive BC break if - The type of the key don't change anymore i.e. array_search(0, ['10' => 0]) will be '10' and not 10. - $array[10] still return $array[10] ?? $array['10'] - $array['10'] still return $array['10'] ?? $array[10] so it still cast the value when accessing to an array key, but when using array_keys/array_search/array_flip/... it won't be cast anymore. --000000000000bacec905d45fe641--