Re: Proposal for new construct: nameof
| From: | Karsten Dambekalns | Date: | Thu, 30 Oct 2008 12:30:53 +0000 |
| Subject: | Re: Proposal for new construct: nameof | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41573@lists.php.net to get a copy of this message | ||
Hi.
Stan Vassilev | FM wrote:
I suggest we introduce a new construct which will return a string when passed any identifier to resolve against the current file's use clauses: nameof Symbol\Name; ...
NOTE: As a side effect this means less direct writing of string function/class names, and less complaints about \ being the escape characters.Oh, that sounds very good. We do a lot of getComponent($classname) stuff, that would be awesome in that context. Regards, Karsten