- error_reporting: documentation ( source)
<?php
error_reporting(E_ERROR);
class Foo
{
function bar() {
echo isset($this) ? 'Instance' : 'Class', "\n";
}
}
// OK:
Foo::bar();
class Baz
{
function test() {
Foo::bar();
}
}
// Take care:
$baz = new Baz;
$baz->test();