Re: New Feature: Fully qualified class name resolution as scalar with class keyword
| From: | Ralph Schindler | Date: | Tue, 17 Apr 2012 14:54:53 +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 internals+get-60081@lists.php.net to get a copy of this message | ||
Hi Nikita,
A quick note on the patch: As the class name is compile-time resolvable it should in my eyes also be available as aI've added this to the patch and Zend/tests: * https://github.com/ralphschindler/php-src/compare/master...feature/class-name-scalar I've also added an RFC page, any thoughts on improving the RFC? * https://wiki.php.net/rfc/class_name_scalars -ralphstatic_scalar, so that it can be used in initialization lists:public function doFoo($withClass = ABC::class) { new $withClass; // or whatever }To be available as both astatic_scalarand a generalscalarone should put the rule in thecommon_scalarsection. What do you think?