<?php
abstract class A {
public $foo;
public function __construct() {
$this->foo = 'bar';
}
public function getDatBoop() {
return $this->boop;
}
}
class B extends A {
private $boop = "a";
}
$test = new B();
var_dump($test->getDatBoop());
Fatal error: Uncaught Error: Cannot access private property B::$boop in /in/BuCNv:11
Stack trace:
#0 /in/BuCNv(21): A->getDatBoop()
#1 {main}
thrown in /in/BuCNv on line 11
Process exited with code 255.