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