Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62989 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89303 invoked from network); 13 Sep 2012 21:30:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2012 21:30:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 173.203.6.155 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.155 smtp155.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.155] ([173.203.6.155:37624] helo=smtp155.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/AA-31416-A6052505 for ; Thu, 13 Sep 2012 17:30:19 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp28.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id 7F7FD16009B; Thu, 13 Sep 2012 17:30:15 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp28.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 8B13116014C; Thu, 13 Sep 2012 17:30:13 -0400 (EDT) Message-ID: <50525064.9090009@sugarcrm.com> Date: Thu, 13 Sep 2012 14:30:12 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Ralph Schindler CC: internals References: <504F4D33.4070306@ralphschindler.com> <50524989.10204@ralphschindler.com> In-Reply-To: <50524989.10204@ralphschindler.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [VOTE] ::class feature to resolve namespaced class names to scalars From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > * Here are the edge cases / implementation details that need a decision: > > - $variable::class (should it even be supported?) I don't see it doing anything useful. > - self, static, parent::class not in a class definition > - self, static, parent::class in a method signature > - self, static, parent::class in a method body In constant context, self:: may work, but static:: can't work for obvious reasons. parent:: can be made work too I think - though the class may not be known at the run time, its name should be. As for runtime context, static:: can be made work too but I wonder why bother if we have perfectly good get_called_class()... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227