Re: RFC: Traits for PHP
| From: | Rasmus Lerdorf | Date: | Tue, 19 Feb 2008 06:42:32 +0000 |
| Subject: | Re: RFC: Traits for PHP | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35580@lists.php.net to get a copy of this message | ||
Sebastian Bergmann wrote:
> Rasmus Lerdorf schrieb:
>> The idea here is that we want to be able to cache opcodes, classes and
>> functions and optimize them out of the runtime context so the executor
>> can skip creating classes and functions on every single request.
>
> Thanks to their Flattening Property, there should be no notion of traits
> at runtime. So once the compiler has flattened a trait into a class it
> is just normal oparrays APC needs to deal with. At least as far as I can
> see.
This was in response to the suggestion that it should be extended to do
runtime conditional modification of the classes.
-Rasmus