Re: New Feature: Fully qualified class name resolution as scalar with class keyword

From: Date: Sat, 08 Sep 2012 17:29:31 +0000
Subject: Re: New Feature: Fully qualified class name resolution as scalar with class keyword
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-62908@lists.php.net to get a copy of this message
Hi Ralph, I still like the proposal. Am 08.09.2012 um 07:12 schrieb Ralph Schindler <ralph@ralphschindler.com>: [...] >>> But yes, I agree that runtime resolution only duplicates existing >>> behavior, so it isn't really necessary (you could argue thought that >>> self::class similarly also only replicates the existing __CLASS__). It >>> would be nice for consistency in my eyes, but I'm good without it too > > The current patch allows for the following: > > self::class -> resolves to name in active_class_entry > static::class -> resolves to FCALL get_called_class() > parent::class -> resolves to FCALL get_parent_class() > > I would have liked to have done parent::class w/o FCALL but the active_class_entry's > parent is empty even when inside of a class extending another class. > [...] What I find absolutely confusing is the use of Class vs. CLASS vs. class for constant names. Let’s limit the translation to FQCN. cu, Lars

« previous php.internals (#62908) next »