The following code has a problem with the access level of $bla.
Normally I would expect the error output “Fatal error: Access level to mySlave::$bla must be public (as in class myMaster)”. But my page is just empty/white althoug all error reporting is activated.
I have this on two different systems while php-sandbox pages show the error message.
The actualy problem is that our error handler is not able to catch this.
What needs to changed to be able to handle such errors?
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
class myMaster {
public $bla;
private function blubb() {
$this->bla='blubbaa';
}
public function test() {
$this->blubb();
return $this->bla;
}
}
class mySlave extends myMaster{
protected $bla;
private function bla() {
$this->bla='blubbaa';
}
public function test2() {
$this->blubb();
return $this->bla;
}
}