- var_dump: documentation ( source)
- error_reporting: documentation ( source)
<?php error_reporting(E_ALL);
class Foo
{
static function test()
{
var_dump(static::getValue());
$x = function () {
var_dump(static::getValue());
};
$x();
}
static function getValue()
{
return 'Foo';
}
}
class Bar extends Foo
{
static function getValue()
{
return 'Bar';
}
}
Foo::test();
Bar::test();