Check if current function called statically or not
THIS SITE IS MIRROR || Skip to Full Contents (Read More)
Check if current function called statically or not - pre>
static = issetthis amp;amp; get_classthis == CLASS;
if static
return self;
else
$static = !(isset($this) && get_class($this) == CLASS);
if ($static) {
return self;
} else {
return $this;
}
in class example:
class Foo {
function bar() {
$static = !(isset($this)
THIS SITE IS MIRROR || Skip to Full Contents (Read More)
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.