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

From: Date: Mon, 16 Apr 2012 01:31:27 +0000
Subject: Re: New Feature: Fully qualified class name resolution as scalar with class keyword
References: 1 2  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

One thing I personally dislike in this implementation is the difference between CLASS and class ... One with and one without namespaces ...
I am not quite following. There is no functional difference between "class", "CLASS", or "Class". The parser is case insensitive with regards to keywords, which "class" or T_CLASS is on of. The code snipped I showed there was from the .phpt test that I had included in the Zend/test code base to ensure it worked and did not break existing tests. As per the namespaced and non-namespaced blocks, I was demonstrating how ::class would resolve names regardless of if it were a FQCN or a short class name. Effectively, you can put ::class behind any "type" name and it should work as demonstrated. -ralph

Thread (41 messages)

« previous php.internals (#59981) next »