Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8523 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99378 invoked by uid 1010); 15 Mar 2004 15:07:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99353 invoked from network); 15 Mar 2004 15:07:51 -0000 Received: from unknown (HELO mail.appliedsec.com) (69.17.65.231) by pb1.pair.com with SMTP; 15 Mar 2004 15:07:51 -0000 Received: from appliedsec.com (localhost.applied.sec [127.0.0.1]) by mail.appliedsec.com (Postfix) with ESMTP id ADC3578C5F; Mon, 15 Mar 2004 10:01:11 -0500 (EST) Message-ID: <4055C6B1.3050101@appliedsec.com> Date: Mon, 15 Mar 2004 10:07:29 -0500 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030807 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Gutmans Cc: internals@lists.php.net References: <5.1.0.14.2.20040315080605.01732e80@127.0.0.1> In-Reply-To: <5.1.0.14.2.20040315080605.01732e80@127.0.0.1> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: class constants in RC1 From: hans@appliedsec.com (Hans Lellelid) I notice that in the new RC1, the following reference to class constants is no longer possible: class MyClass { const MY_CONST = 1; function __construct() { echo MY_CONST; } } You must now use self::MY_CONST to reference the class constant. While I can see that the pre-RC1 behavior would not provide a way to access global constant if class had const of same name ... I figured I'd ask anyway whether this change is intended or a side-effect of some other fix. I fall into the category of people who were really enjoying not having to specify self:: before (so now I have a lot of code to fix, apparently). Thanks- Hans