Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116777 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 837 invoked from network); 3 Jan 2022 15:01:07 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2022 15:01:07 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4CDA91804C9 for ; Mon, 3 Jan 2022 08:08:06 -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=-2.1 required=5.0 tests=BAYES_00,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-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) (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 ; Mon, 3 Jan 2022 08:08:05 -0800 (PST) Received: by mail-ua1-f48.google.com with SMTP id o1so58506189uap.4 for ; Mon, 03 Jan 2022 08:08:05 -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=453LguV8Q0nTuzf+XZkIACzE5OO97gKgoy8M3OOugo8=; b=M+nJsg0P7zZZilcceXcXG5Cb7Ev7NLqy2c8urHyq3mzMO8z5FA+Gay8/5WzovBRJTJ f8ZwkVyIziMX2Yghy2Ng869Gd7mPGDD9vMZiMI8XH9IQ+Dln4XJJPCxwr1y7aqeeDs0X JoUH1EiQiYrXZd9GiBXKixTLD6U6TY02zj34YFUelEUW/3LJ9VxuJwPT/IAYhJWZEyg2 6DrR6ijnPOoLXH4OTgzeRg7LO53SXuAvqnA3ct63NMODP9P83HDtAAZ4HYzI/02+1DPi 6DDWm2dfhcJ742bn6+jegvInIadFvLJJAHN6k8XOZsVgNx+ssFo5ftbQmhjEbJ1cTDjy MzPQ== 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=453LguV8Q0nTuzf+XZkIACzE5OO97gKgoy8M3OOugo8=; b=saZ7AyNP+Vi1rynftD7ONQtJ9S3DuE3DFuzrqdfE6EC+BFhA3k5U3yWkEYmh8ZJM3+ MGWnWDsaPg362oXtgMdC1oFIV04AM2vmLZiiWsJ2Rim8DohBXqvYQ8pg7v+QPYIlF44C bHmGmJDs81l53qNy16WYIVmjldzxOg5E4QZ71sVLqJpJHHC4ip220Aa3BFkoT1kANGZV hOY1BxpRQyG2msBoAv7kg8hojnuAE3C92HMFKImd8tI7VjPxCjxN95ttx8m1rSDQ0nZm cWZgengLkwMxA5/N0NEevwPr1GyZY1rKP3UT7tFfkw6VURu1ZqHr7VzZ3j0IAaIcrcDA dX8w== X-Gm-Message-State: AOAM531qtXKG/zw/dGo7okDnbNmnljDVC+s6Q7giZ3Jrkr4bHwz/6Gz4 cQt3h+16qNn/ozYfzdYixv0HzY9hhh9SAeP0h9Y= X-Google-Smtp-Source: ABdhPJx0Df8kpj56X9cY5m9GZhDvrAc6724vFGx3qYLmOJq3A70ZVL1B/NrFjfXnQMjSZ6eHnrPJm6ggMj2lZ9+ny7g= X-Received: by 2002:a67:c886:: with SMTP id v6mr14218758vsk.15.1641226085152; Mon, 03 Jan 2022 08:08:05 -0800 (PST) MIME-Version: 1.0 References: <1640910093.890171965@f721.i.mail.ru> <1641095231.967164658@f750.i.mail.ru> <2DC31ED4-8C27-4ADF-9946-8369C6E0A42F@gmail.com> In-Reply-To: Date: Mon, 3 Jan 2022 11:07:53 -0500 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000cd3b7405d4afb9a7" Subject: Re: [PHP-DEV] RFC: Stop to automatically cast numeric-string to int when using them as array-key From: chasepeeler@gmail.com (Chase Peeler) --000000000000cd3b7405d4afb9a7 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 3, 2022 at 10:48 AM Rowan Tommins wrote: > On 3 January 2022 15:41:48 GMT, Chase Peeler > wrote: > >But "001" casted to 1 will then get casted back to "1" not "001". > > "001" would not be cast to an integer in this context: > https://3v4l.org/gGFHJ > > My mistake, I thought it did get casted. Still, I think you add a lot of complexity because you'll need to keep track of whether or not a key was a string or not. There is no guarantee that all numeric keys were originally a string: [ "1" => "foo", 2 => "bar"] And, for the record, I am not in favor of the original proposal either. I think it's way too big of a BC break like others have said. > Regards, > > -- > Rowan Tommins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > -- Chase Peeler chasepeeler@gmail.com --000000000000cd3b7405d4afb9a7--