Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9073 invoked by uid 1010); 28 Mar 2004 17:21:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9039 invoked by uid 1007); 28 Mar 2004 17:21:08 -0000 Message-ID: <20040328172108.9037.qmail@pb1.pair.com> To: internals@lists.php.net References: <5.1.0.14.2.20040315080605.01732e80@127.0.0.1> <5.1.0.14.2.20040315080605.01732e80@127.0.0.1> <5.1.0.14.2.20040315174015.0a198dd0@127.0.0.1> <20040328165557.65979.qmail@pb1.pair.com> <193608357171.20040328191050@marcus-boerger.de> Date: Sun, 28 Mar 2004 19:21:29 +0200 Lines: 15 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Posted-By: 81.0.84.246 Subject: Re: [PHP-DEV] Re: class constants in RC1 - why not __self:: then? From: lunakid@neuropolis.org ("Luna Kid") > > This way (writing __thisclass::MYCONST instead of MyParticularClassName::CONST > > we could freely decide to favor clean style, or performance, depending on the specific > > situation. > > No need for that we have 'self': > php -r 'class c { const c="Hello\n"; static function f() { return self::c; }} echo c::f();' Yoohoo!!! Wonderful, thanks! :) (Dunno how I could miss this, but who cares now that PHP is PERFECT... :) ) Cheers, Lunatic