Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99729 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94883 invoked from network); 4 Jul 2017 00:23:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2017 00:23:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yb0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:33502] helo=mail-yb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/AA-15131-400EA595 for ; Mon, 03 Jul 2017 20:23:33 -0400 Received: by mail-yb0-f170.google.com with SMTP id 84so59639459ybe.0 for ; Mon, 03 Jul 2017 17:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=K7N3YwyqEXsikGplOj4z0SrhrtRTBGY4afk6SX4cNIY=; b=lVWev4bSIGOu8XcDnpr6JVxvP5WDDJnr7tZ3t4ux+Fr4TQSpj/gPbdFjww1yHTEbXr 6HanCXSrZUewKV7MPLNyk3061ODkwBVoaWpezaZiaGadEkh/EwvCjY+evTfwBCohRNhs S2pOiGiqPqP23UZ7xFF88BqcuFRorPhkVrXv6cmGtle/0uFz62xFIAzrdioyuGqUcxbt Dq7wyavJNahZMY1xk+u7EjDe5Y+X4fU5t4DF10AEaYO0+g4M3Y8fthLzyZgNaVDJgwPV FFWmaWBkyQVRnGrnSyFJbkzMaBiYi8vqWWNt8BqzFps9NwyEGa58ogETwbHMFSEx6ESw zWJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=K7N3YwyqEXsikGplOj4z0SrhrtRTBGY4afk6SX4cNIY=; b=aGAey2s6/zlasyJivlZ/P1YZeNumxd/hLksiMUu41vH/AEwCquX3kgFDZxo/cUtGvL K7u9R4gwlY+lUFgaCvDUO0/RF+6SnKSZNI/0iGI88QcFtaBj7r960WP/wqst0LZ0kP1z 4MGAJfbkH2yE96yhw1W7GI83OPJJSaTMIeTTDIVEsPjJ4xi3lGrx4E3g1TQJxjMarcxv xHjl6jxn8rMgxFmnfAcmzPg7SaArMf4EY4btuB6VS8HUTjYCmwTqx6gM+RKU7yNLMgad +oBx8rRwQ9NuxTbup9V6363rVzgX+EBaT+SNnAQ5UrUULkjnAdmPMbfIv2ICIJODyFh3 QM0w== X-Gm-Message-State: AKS2vOwkv4xH4r8qH1jCfF+/3xbLdZ9sJhMmGT0ABVt9mclZzbX5YWCr eoAeyw8ikNQ3OR9c3UU= X-Received: by 10.37.172.153 with SMTP id x25mr30219398ybi.96.1499127810070; Mon, 03 Jul 2017 17:23:30 -0700 (PDT) Received: from Stas-Air.lan (108-233-206-104.lightspeed.sntcca.sbcglobal.net. [108.233.206.104]) by smtp.gmail.com with ESMTPSA id u82sm7497280ywu.73.2017.07.03.17.23.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 17:23:29 -0700 (PDT) To: Dmitry Stogov , "nikita.ppv@gmail.com" , Sara Golemon , Bob Weinand Cc: PHP internals list References: Message-ID: Date: Mon, 3 Jul 2017 17:23:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > > Please take a look at https://bugs.php.net/bug.php?id=74836 > > What is the best option to fix this? > > > The most consistent way, from my point of view - disabling zero-prefexed numeric strings in all cases, but this is a new behavior break. I think this is very corner case, for string offsets. So for 7.2 to drop support for leading-0 string, with note in UPGRADING and maybe a notice/warning, would be ok. It is not good though that read access and isset are not consistent, this should always work the same. It is especially worrying that "010" and $i = "010" work differently, that should never happen. The problem is if we disable it for string offsets, it would be weird to keep it for array offsets, and so for arrays "010" should be treated as string I guess? Which may involve more breakage. So I wonder if a better way would be to just let it be as it always was, and maybe make leading-0 strings not to be interpreted as numbers for both cases in PHP.next when we can do BC breaks. -- Stas Malyshev smalyshev@gmail.com