Re: keywords not allowed in dynamic class references
| From: | Etienne Kneuss | Date: | Tue, 26 Feb 2008 19:59:43 +0000 |
| Subject: | Re: keywords not allowed in dynamic class references | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969378625@lists.php.net to get a copy of this message | ||
Hello Daniel,
On Tue, Feb 26, 2008 at 7:56 PM, Daniel Convissor
<danielc@analysisandsolutions.com> wrote:
> Hi Folks:
>
> I'm glad to see PHP 5.3 is allowing the use of variables to access
> classes in a static context and documentation to that effect. (Thank
> you Etienne, at least for the docs, if not the C code too.) Here's
> what's in the docs at the moment:
>
> As of PHP 5.3.0, it's possible to reference the class using a
> variable. Keywords like self, parent or static are not allowed
> in dynamic class references.
>
> I didn't understand what the second sentence was saying. I was thinking
> that _perhaps_ the method itself could not use static constructs, which
> of course, doesn't make sense. Researching this issue lead me to the CVS
> commit log for that addition says:
>
> Document the fact that $classname="self"; is not supported
>
> That made the situation very apparent. I would like to clarify the
> documentation. Perhaps the last sentence can be changed to:
>
> The variable's value can not be a keyword (e.g. self,
> parent, static).
Looks fine to me, please go ahead and commit this.
As you may have seen, I documented this feature in multiple files, so
be sure to change them all.
Thanks in advance
>
> Or perhaps some folks here have some other preference?
>
> I have commit access to phpdoc.
>
> Thanks,
>
> --Dan
>
> --
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> data intensive web and database programming
> http://www.AnalysisAndSolutions.com/
> 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
>
>
--
Etienne Kneuss
http://www.colder.ch
Men never do evil so completely and cheerfully as
when they do it from a religious conviction.
-- Pascal