- forward_static_call: documentation ( source)
<?php
// Source: https://bugs.php.net/bug.php?id=62330
class A
{
public function __call($name, $args)
{
echo "NO\n";
}
public static function __callStatic($name, $args)
{
echo "YES\n";
}
}
class B extends A
{
public function test()
{
forward_static_call(array('parent', 'test'));
call_user_func(array('A', 'test'));
A::test();
static::test();
}
}
class C
{
public function test()
{
A::test();
}
}
A::test();
$b = new B();
$b->test();
$c = new C();
$c->test();