Hello Stanislav,

Monday, November 8, 2004, 11:29:13 AM, you wrote:

MB>>> you won't be able to tell from inside __call() whether a static or
MB>>> non static method was meant.

> Technically, it's not a big problem IMO - there could be an argument added
> or some other solution, like presence of $this.

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

MB>>>non static method was meant. The same holds for __get() and __set().
MB>>>Also if we start using such code we'd need a class constructor. Thus
MB>>>this dicussion is leading to the following set of new magics:
MB>>>
MB>>>__static_get
MB>>>__static_set
MB>>>__static_call
MB>>>__static_construct

> What do you mean by __static_construct? When do you expect it to be 
> called? And, BTW - if you need to override method calls, etc. for a 
> global object, why not to use singletons? 

I didn't say it is necessary :-)

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

Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

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

Reply via email to