On 2/3/11 8:49 PM, Chris Stockton wrote:
> Hello,
> 
> On Thu, Feb 3, 2011 at 8:38 PM, Ben Schmidt
> <mail_ben_schm...@yahoo.com.au> wrote:
>>
>> Do you yourself have any situation where this is useful? Does it solve
>> some problem? Does it enable you to do things better than before?
>>
>> Ben.
>>
> 
> It does not provide a solution to a currently unsolvable problem, it
> is simply a convenience for situations when you want a class to
> perform any kind of initialization directly after compilation/loading
> (whatever term you find easier on the ears).

This creates problems for opcode caches since the classes are all
precompiled and usually optimized to the point where the opcodes that
loads them are NOP'ed away and you just have the full class table cached
in memory for each op_array.  Walking through that class table on every
request and looking for these magic methods to call would be quite
annoying, especially since most of them wouldn't have such a method to
begin with.

-Rasmus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to