- error_reporting: documentation ( source)
<?php error_reporting(E_ALL);
class Foo
{
public function test(Bar $bar)
{
$bar->barMethod();
}
}
class Bar extends Foo
{
protected function barMethod(){
echo 'BAR' . "\n";
}
}
(new Foo())->test(new Bar());