3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait t { private $tt = 'trait'; private function go() { return $this->tt; } } class at { use t; private $tt = 'class'; public function aa() { return $this->go(); } } $r = new at; var_dump($r->aa());
based on Np4Rn
Output for 7.0.0 - 7.2.0
Fatal error: at and t define the same property ($tt) in the composition of at. However, the definition differs and is considered incompatible. Class was composed in /in/aCInT on line 16
Process exited with code 255.
Output for 5.4.8 - 5.6.28
Fatal error: at and t define the same property ($tt) in the composition of at. However, the definition differs and is considered incompatible. Class was composed in /in/aCInT on line 28
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/aCInT on line 3
Process exited with code 255.