Image

Imagehipmaestro wrote in Imagephp

static methods detecting class?

Take the following code:

class Super
{
  function test()
  {
    print "I wish I knew who I was.";
  }
}

class Sub extends Super
{

}

Sub::test();


Is there a way, within the test method of the class Super, to determine that the method is being used as a method of the class Sub?

I'd just do get_class($this) to determine the class, but that's not an option when invoking the method statically, because there is no this.