It is still a problem in PHP 5? Huh.

I don't know if I'd consider it a problem, but yes, it still happens in PHP 5.


I discovered this while working on Mail_Mime -- the only way I could come up with to detect if a method is being called statically (without hacking a special property into $object) was:

// determine if this method has been called statically
$isStatic = !(isset($this) && get_class($this) == __CLASS__);

... which is pretty hacky, but it works. I was tempted to drop this into the note, but held back (-:

S

Reply via email to