Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94065 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15210 invoked from network); 17 Jun 2016 06:10:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2016 06:10:52 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 157.56.110.147 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 157.56.110.147 mail-bn1on0147.outbound.protection.outlook.com Received: from [157.56.110.147] ([157.56.110.147:34736] helo=na01-bn1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/FB-25388-A6493675 for ; Fri, 17 Jun 2016 02:10:52 -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=AeEDu6AvWjRj39xYqA4P27bSIT93uSNaU24cYc+iSFc=; b=ugNyS4flDvZD54HhHn69cMh56H6xGQA0wCeEqkDqq7J9npYZo7chWh3m86nxHsUL/iM1QJ96kBiyb/tpU+oyScNJPeMod4VR4HLNPngB9DDkQ49HBM2BgZZvUL6+wVo2L3QPDDNm1Ll3Jxyn8Unh6KtTbOjzqyqyUerDHqgrmEs= 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.523.12; Fri, 17 Jun 2016 06:10:46 +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.0523.011; Fri, 17 Jun 2016 06:10:40 +0000 To: Stanislav Malyshev , PHP internals Thread-Topic: [PHP-DEV] [RFC] Throw Exception on Attempt of Constant Redefinition Thread-Index: AQHRw1M9yKVP3Kv5KUGQ4D8qa0qTMJ/sXluAgADY8EE= Date: Fri, 17 Jun 2016 06:10:39 +0000 Message-ID: References: ,<2765db1c-4fc4-acf5-eccc-156a266b0750@gmail.com> In-Reply-To: <2765db1c-4fc4-acf5-eccc-156a266b0750@gmail.com> 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: [52.34.160.189] x-ms-office365-filtering-correlation-id: 7e307ef5-2a3f-46b6-9ff6-08d396761b97 x-microsoft-exchange-diagnostics: 1;BY2PR0201MB1781;6:ZtuhB0yP18VKIiqcgd7GW6GzPuOe3OLxXrHN7vXS4JkgxKHhNumg3G1w8vK47C3L3GubXfvuI46DbLhXPAJLjh7UzyD4EeN4eRPLEIlE1p4cwiTpFVQPwkgI5C5I4ACndYeyUVTRCI5jSrF/E47bbCqhTZGV9xpZ9HWw2mE+gzIEuMl/wVCKfF4jwD17ZVd4OemOhf0+KF8WGWQgQhKfFcsFLO6jdTTme4X646wUsJfyRtFlbSI8dvkskViD72luFANxtM41Fd80ne0lqwYaf2RMmOhlG2VtIvmv4DyLjLU=;5:mxIkA5ifbPtaMD6By8q/mR/lB4xzO+ArwADNl2jxtKK8MIrQsLBRqCXe7T2toK681GWMXj9F0xtb8MzEXqAK4zbd7/UaEJdmmTogx17QR68RfyrEDhS7OmIbwapoPKaC9bny/3Kd+naUg2v2w4mISg==;24:7QOQvLsBP7zDUR2J2A4VJcC6z6sarqZ58wyZDO12h6prZdoIxJ2Lm0Wz2F70njrifP6UiE+YggP9a8ruwlWd+Q/0i7gZ7Z1bo72RfpIseSY=;7:vjHy+mwQWwJn1PfmmEZlZPmn9BrHT1MYlmMI7mLpoICSv2Wg5yVE+OZmNk2EngHbz/S1d9KQWdFLUp6tH8x3ne+MyyqwWuXcI01XVsG9R6jqfkBsuffRho7upn+Idy1mN+j66RprXriohsYSSMXPDjSBgNYbxaPm45TEUKxBR1KYg8a5gVu8mDkCE86rMNJ2BH4stQd7VJ/9Pa0hYyZXFg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY2PR0201MB1781;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0201MB1781; x-forefront-prvs: 09760A0505 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916002)(377454003)(199003)(189002)(24454002)(99286002)(19580395003)(19580405001)(3280700002)(106356001)(81156014)(107886002)(122556002)(7906002)(92566002)(5001770100001)(81166006)(19617315012)(97736004)(66066001)(5002640100001)(9686002)(189998001)(2950100001)(15975445007)(8936002)(68736007)(8676002)(2900100001)(101416001)(77096005)(3660700001)(76176999)(86362001)(19625215002)(16236675004)(54356999)(50986999)(5004730100002)(106116001)(10400500002)(105586002)(3846002)(6116002)(2906002)(586003)(87936001)(102836003)(5008740100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0201MB1781;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;CAT:NONE;LANG:en;CAT:NONE; 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_B22E7C4633F9775Cbf55295ac9a24dafb8c8e8aae8493fe3mailout_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2016 06:10:39.9698 (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_B22E7C4633F9775Cbf55295ac9a24dafb8c8e8aae8493fe3mailout_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Got it :( Then this may be a serious BC break, and it's better to depricate it in 7.1= and throw exception only in 8. Thanks. Dmitry. On Thu, Jun 16, 2016 at 8:14 PM +0300, "Stanislav Malyshev" > wrote: Hi! > Please review: https://wiki.php.net/rfc/constant_redefinition I would propose to not throw an error if constant is redefined to exactly the same value. Some of the code might be doing this unknowingly, e.g. by writing include instead of include_once, and there's no real reason to break it. -- Stas Malyshev smalyshev@gmail.com --_000_B22E7C4633F9775Cbf55295ac9a24dafb8c8e8aae8493fe3mailout_--