Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86131 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70675 invoked from network); 7 May 2015 15:04:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2015 15:04:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.218.43 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.218.43 mail-oi0-f43.google.com Received: from [209.85.218.43] ([209.85.218.43:33161] helo=mail-oi0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/42-53430-3FE7B455 for ; Thu, 07 May 2015 11:04:20 -0400 Received: by oica37 with SMTP id a37so35663098oic.0 for ; Thu, 07 May 2015 08:04:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Phwb8UuAkKZAO03cNNQy5kP9IVdSMsjDibPVPO6JZm8=; b=EXE+9pCbjpBqjJddfe5+a4jm4M+kNVEUo0qtUs4oQJB7V8KHbP7qELNrngcAsTrO4t Pc8oF46UxiHrF33AXp60tTOyteyAD2sjgM9la9SRDLtDtVRfhPfSh9fX4CFRusPOPORo Z5IFp3juDyehvKD34b8IC50lemJMdT9RFOikVf22wIJcwTDZlU/5qiaWVcm6zGtodhBK 0ADVZJSiK8UMkYBScEPkjC2AH9aHSW7E90G+wetcFbOhmX+X9WgwJFhDnIj08d1bR7MS /k7mgDXR4qRY4qLuPF/PXhT4u0qBPu5IT1Guwjj4l3owlHIiPrRyy26v3i1cET6xqxT3 nwYA== X-Gm-Message-State: ALoCoQn4UmqO8AiHC7yCBGrJCJToKkn+za6+xnE/9AKdwTnXOp2FIcdXkOTJD2BM7RLeUEqyt1iW X-Received: by 10.182.230.136 with SMTP id sy8mr3625447obc.44.1431011055876; Thu, 07 May 2015 08:04:15 -0700 (PDT) Received: from [172.16.1.6] (ip72-211-83-231.no.no.cox.net. [72.211.83.231]) by mx.google.com with ESMTPSA id ek11sm1239339oeb.6.2015.05.07.08.04.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 08:04:15 -0700 (PDT) Message-ID: <554B7EEE.6000701@ralphschindler.com> Date: Thu, 07 May 2015 10:04:14 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Add support $object::class From: ralph@ralphschindler.com (Ralph Schindler) >> 2. Illogically - Bar::class valid syntax, $object::class invalid syntax. >> > I'll grant you the consistency argument. I'm all for consistency, but > that's the ONLY valid reason you've stated. Even then I think this part of the argument is fairly weak. In Bar::class, the context of Bar is always a class name (either short due to do namespace or use statements, or long fully qualified). $object is not guaranteed to be an object, it could be anything (int, string, etc) or nothing (null). using ::class for a variable, I'd argue, makes for less consistency. What would the replacement be for non-object variables? An error, exception, or false, or string type? At least in "Bar::class", you'll always get a string representation of what the fully qualified class name resolves to. That said, the argument could be made that since static::class, self::class, and parent::class fall into the same category of potential runtime resolutions that $object::class too should be supported. -ralph