Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62988 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87513 invoked from network); 13 Sep 2012 21:19:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2012 21:19:39 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:38006] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/5A-31416-AED42505 for ; Thu, 13 Sep 2012 17:19:39 -0400 Received: by lahl5 with SMTP id l5so2321860lah.29 for ; Thu, 13 Sep 2012 14:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m7w6OeqWUC/4TtIWMTe56Rh+FWX3MUjSnW1MbrYhmtw=; b=d3gjUgeCmsparFSWbJIIPlWTdt5jdDJEPOYo6Npl8w8xck0//5A8ds8pHhERvuDFiF Y+lSGxV7+y4RyO5vf/HVV/JXgCXnRgYcMBuaz7ToE2SposNBWG6qQ94vwf9+rMmp403+ DK18RKeSYe1tmmKAVa392WSoWDd3KRR0VIU3VTw2gNZ3NA3laxA+Pm5ho+nOsOLqDk/W COuAvbrm+0rnEpcG8fEKoEw+rPXixf/q4h3uFcurhnE+b1Gp1CtgoqiPWAOejJYkPzFA ldaIcpFUkT53wNQWQpteDARH57Fq8Eh0p02j2xqzJRKDS5mefD5SiUov5gxrJIki32nF pv4g== MIME-Version: 1.0 Received: by 10.152.144.168 with SMTP id sn8mr535611lab.1.1347571174195; Thu, 13 Sep 2012 14:19:34 -0700 (PDT) Received: by 10.114.22.1 with HTTP; Thu, 13 Sep 2012 14:19:34 -0700 (PDT) In-Reply-To: <505248D9.2020405@sugarcrm.com> References: <504F4D33.4070306@ralphschindler.com> <5051968E.7030908@zend.com> <553F2A43-1A28-4AB5-9D6F-6B5ADFC420DB@strojny.net> <50524786.60805@ralphschindler.com> <505248D9.2020405@sugarcrm.com> Date: Thu, 13 Sep 2012 17:19:34 -0400 Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f23468725c03b04c99bdd2f Subject: Re: [PHP-DEV] [VOTE] ::class feature to resolve namespaced class names to scalars From: ircmaxell@gmail.com (Anthony Ferrara) --e89a8f23468725c03b04c99bdd2f Content-Type: text/plain; charset=ISO-8859-1 Stas, On Thu, Sep 13, 2012 at 4:58 PM, Stas Malyshev wrote: > Hi! > > >>> I would expect $variable::class to work (like late static bindings). > > What this would mean? ClassName::class has a clear meaning - ClassName > is a name of the class (possibly aliased) and class is the property of > this class, namely its full name. However I do not see how > $variable::class can do anything meaningful. Since namespace resolution > is static compile-time, $variable can not be anything but the full name > of the class, so what $variable::class supposed to do? Just be equal to > $variable? What's the point of such operation, what may be achieved by it? > Right now, you can access static properties and methods from a string/object by doing $var::$foo... I would assume that this works the same way. That way, you can take in a string class name, or an object, and get the class in one shot `$obj::class` instead of `get_class($obj)`... Just for consistency... Anthony --e89a8f23468725c03b04c99bdd2f--