Image

Imagehipmaestro wrote in Imagephp

Context of Static Method Calls

Take this:


abstract class A {
    public static function foo() {
        $class = "Don't know...";
        echo "$class<br />";
    }
}

class B extends A {
}

class C extends A {
}

B::foo();
C::foo();

Is there a way to determine, inside the foo() method, whether it's being called as a method of B or of C?