Context of Static Method Calls
Date: 09/27/07
(PHP Community) Keywords: no keywords
Take this:
abstract class A {
public static function foo() {
$class = "Don't know...";
echo "$class
";
}
}
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
?
Source: http://community.livejournal.com/php/587764.html