- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
class Foo {
function test() {
$this->staticTest();
}
function test2() {
self::staticTest();
}
function test3() {
static::staticTest();
}
public static function staticTest() {
echo 'jow'.PHP_EOL;
}
}
class Bar extends Foo { }
$foo = new Foo();
$foo->test();
$foo->test2();
$foo->test3();
$bar = new Bar();
$bar->test();
$bar->test2();
$bar->test3();