Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60088 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24353 invoked from network); 17 Apr 2012 17:23:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2012 17:23:10 -0000 X-Host-Fingerprint: 208.107.13.98 host-98-13-107-208.midco.net Date: Tue, 17 Apr 2012 13:23:10 -0400 Received: from [208.107.13.98] ([208.107.13.98:21370] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B9/1A-03996-EF6AD8F4 for ; Tue, 17 Apr 2012 13:23:10 -0400 Message-ID: To: internals@lists.php.net References: <4F89D4F1.8070009@ralphschindler.com> <4F8CEB3B.4080702@ralphschindler.com> <4F8DA14F.1030204@sugarcrm.com> User-Agent: slrn/pre1.0.0-18 (Linux) X-Posted-By: 208.107.13.98 Subject: Re: [PHP-DEV] Re: New Feature: Fully qualified class name resolution as scalar with class keyword From: weierophinney@php.net (Matthew Weier O'Phinney) On 2012-04-17, Stas Malyshev wrote: > > May I suggest using foo::__CLASS__ instead of foo::class ? It's longer, but > > closer to what already exists for this semantic (class name as string), > > don't you think ? > > I like this. __CLASS__ is already being used as class name, and little > chance of colliding with some code since you're not supposed to be using > __ prefix in your names. "class" won't collide anyways, as it's already a keyword, and you can't use it in your constant or function names. __CLASS__ has bad connotations for me, as it resolves to the declaring class normally, not the class invoked. -- Matthew Weier O'Phinney Project Lead | matthew@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc