Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11615 invoked from network); 22 Jan 2009 16:08:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2009 16:08:46 -0000 Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:54006] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/43-15341-C0A98794 for ; Thu, 22 Jan 2009 11:08:46 -0500 Received: from [83.228.56.37] (port=1809 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1LQ26j-0000mX-HC for internals@lists.php.net; Thu, 22 Jan 2009 10:08:41 -0600 Message-ID: To: "PHP internals" References: <49778E0A.5010806@grudl.com> <6E01DF250C3B49319EE799C717FAC6C1@pc> Date: Thu, 22 Jan 2009 18:08:37 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Enhanced __CLASS__ constant From: sv_forums@fmethod.com ("Stan Vassilev | FM") > Why not just enhance get_class() function to accept the object itself > (not only the instance)? > This means: > - No new keyword > - No magic Foo::__MIRACLEHERE__ > - No 50 pages documentation to help user Hi, You can't do this. get_class(SomeClass) would attempt to pass constant named SomeClass to the function. In PHP you can have constant/function/class of the same name and the only way to tell them apart is context. It needs to be either a magic constant or a language construct. Regards, Stan Vassilev