Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99730 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6837 invoked from network); 4 Jul 2017 04:13:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jul 2017 04:13:22 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 104.47.40.128 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.40.128 mail-co1nam03on0128.outbound.protection.outlook.com Received: from [104.47.40.128] ([104.47.40.128:20491] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/4B-15131-0E51B595 for ; Tue, 04 Jul 2017 00:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZbcfNRmhrf1tzH4oYYu7vNmT4iakg4saEF4nTaWRQPg=; b=1vMppp9JX62nlyrDSGSjbEAy/+6CmJfdxp5xTziLS/OeoGuS6uJsx5G1q9lgOQ288PpewHOVKfbYm5mdeTGxocqC2ymRCU10YkGK7qIs578DylaJTop5xEkAnfD0poUfH34kmDL2Y3ZY2PXAcmyYoW318k4rtLBs56qdWpXk4dE= Received: from BN6PR02MB3234.namprd02.prod.outlook.com (10.161.152.32) by BN6PR02MB3233.namprd02.prod.outlook.com (10.161.152.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1220.11; Tue, 4 Jul 2017 04:13:14 +0000 Received: from BN6PR02MB3234.namprd02.prod.outlook.com ([10.161.152.32]) by BN6PR02MB3234.namprd02.prod.outlook.com ([10.161.152.32]) with mapi id 15.01.1220.018; Tue, 4 Jul 2017 04:13:14 +0000 To: Stanislav Malyshev , "nikita.ppv@gmail.com" , Sara Golemon , Bob Weinand CC: PHP internals list Thread-Topic: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken Thread-Index: AQHS9FvE9I6pqRDREESXX/e5zuff2qJDDiJE Date: Tue, 4 Jul 2017 04:13:14 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [213.21.45.232] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BN6PR02MB3233;7:5GcuVAOnnEW2qePt+VgqzWSCAV1AJcJo+LoMZzQB1H6Gt40Muk78uQ1zdVZMQmLFpVnBpwbOszey5772amaKiAYyJDfdRQIGHJ9gnCGaHu+ZSutE+RmZanQUA+i4jqEAzV45egqYJZyNtdZ92xJn68YpHftTo0gJTbkWv6VbhWpEknrC8ppQI0GjZGrLS6fjCyDMr6NAlDLjAYoq7dzSfqhsh8jdjf4tXHs5GDkgUtd+bwlbPlvJGtlxpveChKtCNkhDYmmk/uF5G5kH1tWi+H7M24oBGAgK5uWT2Aerwu4b9TpuOPOotz+1A8zm+pgjP7Ninhzu3eXWkQSctWsP+HtMtPppWTIrHpR0OdAphmcyopFCPRHYGImEXVTVQNxxG5XjX2XsQjkjINzKZIZRbBh1zVZjPIsQBSutmrdhX4OcTd8uTLSavkH3x1w0kUbGBwzbam2XgMlESEfpNwdekW3MSbu8x59WRd1BhPH1WmAKB/9p0fWdU4Y5nIEQL/UP1L5xL/rnk3r7W6o+JeFJbYG8Vvi800hHj046aABxgJMXrssH1PmYOzZzKcHXRNU/ePVWddE+cnkw6AT2M5ff6l2nIPctF/cIU0HCbgg7b0VM7qAL2arNnN2M4EbIwNCLKmrl75GaitpZzDB4TnQK759qzcUAtnsnCnbijmhViiFD5piv4ny5YZslH9ISEyDXEVfsT7fPrEVu4rdxam8hHCJAwP5r3vbAvzNPc3U9LnfYTciOeCndN18x9Thnio3ytcrPUhi9KtV395WQ8IjL0JLko6ytJD2IfA74k8igmSg= x-ms-office365-filtering-correlation-id: 939c0ad9-e807-4642-83ff-08d4c292fdd1 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN6PR02MB3233; x-ms-traffictypediagnostic: BN6PR02MB3233: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(133145235818549)(26388249023172)(236129657087228)(148574349560750); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR02MB3233;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR02MB3233; x-forefront-prvs: 0358535363 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39450400003)(39400400002)(39840400002)(39410400002)(54094003)(377454003)(3846002)(102836003)(9686003)(6306002)(54896002)(53936002)(606006)(7696004)(6116002)(8936002)(6246003)(25786009)(5660300001)(6436002)(74316002)(77096006)(189998001)(39060400002)(8676002)(86362001)(2900100001)(6506006)(81166006)(7736002)(53546010)(38730400002)(2906002)(76176999)(33656002)(50986999)(14454004)(966005)(3660700001)(2501003)(16799955002)(54356999)(236005)(2950100002)(55016002)(66066001)(4326008)(229853002)(99286003)(3280700002)(478600001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR02MB3233;H:BN6PR02MB3234.namprd02.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BN6PR02MB323483424B088EDBD045BF50BFD70BN6PR02MB3234namp_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2017 04:13:14.2540 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR02MB3233 Subject: Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixed numeric indexes in array broken From: dmitry@zend.com (Dmitry Stogov) --_000_BN6PR02MB323483424B088EDBD045BF50BFD70BN6PR02MB3234namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi, I agree with Stas and Sara. it's easier to revert the last optimization and return to 7.1 behavior (eve= n if it's inconsistent). Fixing this inconsistency in PHP-Next would require RFC. Thanks. Dmitry. ________________________________ From: Stanislav Malyshev Sent: Tuesday, July 4, 2017 3:23:27 AM To: Dmitry Stogov; nikita.ppv@gmail.com; Sara Golemon; Bob Weinand Cc: PHP internals list Subject: Re: [PHP-DEV] 7.2 behavior break, Bug #74836 isset on zero-prefixe= d numeric indexes in array broken Hi! > > Please take a look at https://bugs.php.net/bug.php?id=3D74836 > > 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 =3D "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 --_000_BN6PR02MB323483424B088EDBD045BF50BFD70BN6PR02MB3234namp_--