Vererbung in PHP - ohne abstract

class A{
  
  protected $c = 10;
  protected function test(){
    
    echo $this -> c . PHP_EOL;
    
  }
  
}


class B extends A {
  
  protected $c = 1;
  
  public function __construct(){
    
    $this -> test();
  
    $this -> c = "hallo";  
    $this -> test();
    
  }
  
  
  
}


class C extends A {
  
  protected $c = 15;
  
  public function __construct(){
    
    $this -> test();
    
  }
  
}


new B();
new C();