Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8767 invoked from network); 10 Jun 2016 21:27:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2016 21:27:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.110.118 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.110.118 mail-bn1on0118.outbound.protection.outlook.com Received: from [157.56.110.118] ([157.56.110.118:17082] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/C0-04630-5C03B575 for ; Fri, 10 Jun 2016 17:27:34 -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=Xs2Iv7111ZPtLquw7gxFp1of97UiVyWkLA0oRi322DA=; b=YkuaNbJaq8ks66h+uPuGeXcNz51MxvGEfKi6rMExPsbqq4DV/a6kaRydJh8Y8Az4hGA62vxHB5/WyCsK1pcPflXouyjlJ72XZtgNFa+gYiPGElCWTP6BOneUVJjWVHHXGVgy19vCzmbE4oW2a/s5gnlti9AvHXhIQ0QqrqDeJRw= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BY2PR0201MB1781.namprd02.prod.outlook.com (10.163.72.23) with Microsoft SMTP Server (TLS) id 15.1.511.8; Fri, 10 Jun 2016 21:27:29 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0511.010; Fri, 10 Jun 2016 21:27:29 +0000 To: Levi Morrison CC: PHP internals Thread-Topic: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition Thread-Index: AQHRw1M9yKVP3Kv5KUGQ4D8qa0qTMJ/jLMcAgAAI16A= Date: Fri, 10 Jun 2016 21:27:29 +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: [132.245.81.165] x-ms-office365-filtering-correlation-id: c3619e04-8e55-4803-0af2-08d3917606d6 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1781;5:cLvErPLYCzDSUd53aVYsvt+HbRdt5cN8lD5RsTvxbgmVZmOlbnsWTM8oUabxC3alJad+ip8dgbJc4OkLczWbdokh2avlqhhVXc25eG6UgN2wYKlJL1t5SCdcBwVe//QoUpaIsilvZvXUQMEBwQizDQ==;24:2vm/E0H8uMuoDqq1dusJf3bBeY3pr5jBN4erRDNKFVMoxsMHAcu9ovh9J0rfOJBnx/ZHxFEKczcGLLyrZ+95YQb2P9RYz6BeQLxBZLLz7v0=;7:ADaBT2kVgLgTpcKV19tkkS6Ut2dnwZqsAXx4g/jLWMAmeHGesrL4HHZMx03B9aXsj9EzmPNniwwKV0f52FFN0ZelRuXhzdl2sYPaClLRL9qvG0lzr49pIVEso7cZaZgJyS8dtavYWTupf1W1Dvk62KVUPDTQB9ArKDlH81X9cj8LclK2PlpdDUMVHMJPx5Z5XpQwJUkAoh8m+KCQTqAjStlmKv06N55xu2/kvfDpULo= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BY2PR0201MB1781;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916002)(189002)(199003)(377454003)(24454002)(3660700001)(9686002)(5004730100002)(4326007)(76576001)(3280700002)(6116002)(16236675004)(8936002)(2906002)(8676002)(54356999)(7906002)(189998001)(77096005)(33656002)(50986999)(122556002)(74316001)(106356001)(110136002)(68736007)(86362001)(81166006)(2900100001)(2950100001)(586003)(5008740100001)(15975445007)(106116001)(105586002)(76176999)(19625215002)(19580395003)(19580405001)(81156014)(3846002)(102836003)(99286002)(5002640100001)(66066001)(11100500001)(87936001)(19617315012)(5003600100002)(10400500002)(97736004)(92566002)(101416001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1781;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;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_BY2PR0201MB1784B29547CD35B1FE04B3ACBF500BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jun 2016 21:27:29.2507 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1781 Subject: Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB1784B29547CD35B1FE04B3ACBF500BY2PR0201MB1784_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In general, you are right, but this is possible only if application ignores= Error exceptions... ________________________________ From: morrison.levi@gmail.com on behalf of Levi M= orrison Sent: Friday, June 10, 2016 11:50:26 PM To: Dmitry Stogov Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefin= ition On Fri, Jun 10, 2016 at 2:06 PM, Dmitry Stogov wrote: > Hi internals, > > > Please review: https://wiki.php.net/rfc/constant_redefinition > > > Thanks. Dmitry. Dmitry, I am not sure this change will actually allow constant propagation either. Consider this code: In this series of events: - Foo is declared to be 0 - This above file is now included inside a try-catch block that catches the error - FooFactory::make() is now called If Foo =3D 1 was propagated then FooFactory::make() will return 1 instead o= f 0. Am I missing something? --_000_BY2PR0201MB1784B29547CD35B1FE04B3ACBF500BY2PR0201MB1784_--