Re: Re: [VOTE] ::class feature to resolve namespaced class names to scalars
| From: | Stas Malyshev | Date: | Thu, 13 Sep 2012 21:30:12 +0000 |
| Subject: | Re: Re: [VOTE] ::class feature to resolve namespaced class names to scalars | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-62989@lists.php.net to get a copy of this message | ||
Hi!
> * Here are the edge cases / implementation details that need a decision:
>
> - $variable::class (should it even be supported?)
I don't see it doing anything useful.
> - self, static, parent::class not in a class definition
> - self, static, parent::class in a method signature
> - self, static, parent::class in a method body
In constant context, self:: may work, but static:: can't work for
obvious reasons. parent:: can be made work too I think - though the
class may not be known at the run time, its name should be.
As for runtime context, static:: can be made work too but I wonder why
bother if we have perfectly good get_called_class()...
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227