Re: Annotations in PHP7
| From: | Dmitry Stogov | Date: | Thu, 19 Feb 2015 07:14:25 +0000 |
| Subject: | Re: Annotations in PHP7 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83149@lists.php.net to get a copy of this message | ||
On Thu, Feb 19, 2015 at 2:12 AM, François Laupretre <francois@php.net>
wrote:
> If I understand Dmitry correctly, this would be stored as the compiler
> internal representation of the 'new Entity("foo")' code, but this
> wouldn't
> be executed until an external mechanism decides to do so. So, this is PHP
> code and it is compiled and stored in memory besides the function opcodes,
> but not evaluated.
>
Right. It's even not compiled into bytecode, just parsed into AST and then
associated with function/class/property like doc-comment.
> You're right, it contains code. The key point is that this code will never
> be executed nor used in any way until an external mechanism decides to
> retrieve and evaluate it. That's metadata.
>
Right again.
Thanks. Dmirty.
>
> Regards
>
> François
>
> > -----Message d'origine-----
> > De : Crypto Compress [mailto:cryptocompress@googlemail.com]
> > Envoyé : mercredi 18 février 2015 23:11
> > À : PHP Developers Mailing List
> > Objet : Re: [PHP-DEV] Annotations in PHP7
> >
> > Hi List,
> >
> > > <orm(new Entity("foo"))>
> >
> > this may be off-topic. However i'm wondering how this could be an
> > annotation? It looks like code. Why not include this into proper method?
> > What am i missing?
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>