MB>>Adding an argument would be a major BC but sure is_null($this) would work,
MB>>only it would be another big slowdown.

I don't think 2-3 additional opcodes are a "big" slowdown - if you are 
using non-default ctors and accessors anyway, you probably are doing 
something order of magnitude bigger there, not to mention PHP function 
call is costly by itself. 
As for BC - I think it can be made so it would accept old code too, and 
some set of rules could be made about when to call what - e.g., basing on 
number of arguments. If, of course, the whole thing is needed anyway :)

MB>>__static_construct would be called the first time the class is going to be
MB>>used.

The idea doen't seem appealing to me... I wonder why one would need such
tricks and why one won't use more civilized way of doing things - like
appropriate patterns which don't have to require such magic.
-- 
Stanislav Malyshev, Zend Products Engineer   
[EMAIL PROTECTED]  http://www.zend.com/ +972-3-6139665 ext.115

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

Reply via email to