<?php
trait T {
protected $prop = "foo";
}
class Base {
protected $prop = "base";
}
class Bar extends Base{
use T;
protected $prop = "bar";
public function show(){ echo $this->prop; }
}
$x = new Bar;
$x->show();
Fatal error: Bar and T define the same property ($prop) in the composition of Bar. However, the definition differs and is considered incompatible. Class was composed in /in/mMZl1 on line 11
Process exited with code 255.
Fatal error: Bar and T define the same property ($prop) in the composition of Bar. However, the definition differs and is considered incompatible. Class was composed in /in/mMZl1 on line 17
Process exited with code 255.