- forward_static_call: documentation ( source)
<?php
class A
{
public function __call($name, $args)
{
echo "Not static\n";
}
public static function __callStatic($name, $args)
{
echo "Static\n";
}
}
class B extends A
{
public function test()
{
forward_static_call(array('A', 'test'));
}
}
class C
{
public function test()
{
forward_static_call(array('A', 'test'));
}
}
A::test();
$b = new B();
$b->test();
$c = new C();
$c->test();