3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait Bar { protected $things = []; function __destruct() { print_r($this->things); } } class Foo { protected $things = [ '1' => 'one' ]; use Bar; } new Foo();
Output for 7.0.20
Fatal error: Foo and Bar define the same property ($things) in the composition of Foo. However, the definition differs and is considered incompatible. Class was composed in /in/3a1Kt on line 11
Process exited with code 255.