Re: $this availability inside static-functions

From: Date: Thu, 21 Jul 2005 16:16:25 +0000
Subject: Re: $this availability inside static-functions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-17363@lists.php.net to get a copy of this message
how can i check if a method is called statically when called from inside another object? (without debug_bactrace())
<plug type="own">http://blog.phpdoc.info/archives/4-Schizophrenic-Methods.html</plug> Short answer: $isStatic = !(isset($this) && get_class($this) == __CLASS__); HTH S

« previous php.internals (#17363) next »