Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86133 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73173 invoked from network); 7 May 2015 15:14:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2015 15:14:47 -0000 Authentication-Results: pb1.pair.com header.from=ua.san.alex@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ua.san.alex@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.173 as permitted sender) X-PHP-List-Original-Sender: ua.san.alex@gmail.com X-Host-Fingerprint: 209.85.213.173 mail-ig0-f173.google.com Received: from [209.85.213.173] ([209.85.213.173:36030] helo=mail-ig0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/D2-53430-6618B455 for ; Thu, 07 May 2015 11:14:47 -0400 Received: by igbpi8 with SMTP id pi8so25552992igb.1 for ; Thu, 07 May 2015 08:14:44 -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=oMmjzImtmc2ojq7T4mc6+9Fep20UISzuSVvXu+vAUuM=; b=Xe910TtsK4ysPNbIjL0ssLf7nkYMzF33M0s9TUpjd4H+tZDudrVL3a8GP/F30SDLmh 2wum0u5XN8Ec+z9pQ6aDHc8QoduPp6+KfQV4EcMrFAt4pSOAoYzkuCSth4PB7xMfZG1+ PD0l09g61OBm+RjVVQPrzUBFYWaDA3GInuPJ1d8Li3iFHi5pQoFcTJ5DsNgYl495bsfn 3a1GKzyJUOxUvLG21PtxM9L2yFyGt5cXiTPFjyXbuXrcJw+hq0hmkzgsU1Kzm1xO9lAk G1knbpn7fn8y5IqoUWrUnU1tkLF44ZkHBQ92gwvB1+YM6b1oYdtHarnGTDiDmAu4w3Ge L2QA== MIME-Version: 1.0 X-Received: by 10.50.61.200 with SMTP id s8mr15151425igr.7.1431011684369; Thu, 07 May 2015 08:14:44 -0700 (PDT) Received: by 10.50.246.20 with HTTP; Thu, 7 May 2015 08:14:44 -0700 (PDT) In-Reply-To: <554B7EEE.6000701@ralphschindler.com> References: <554B7EEE.6000701@ralphschindler.com> Date: Thu, 7 May 2015 18:14:44 +0300 Message-ID: To: Ralph Schindler Cc: internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Add support $object::class From: ua.san.alex@gmail.com ("S.A.N") > $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. $scalar::class === gettype($scalar) $object::class === get_class($object) > 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. +1