3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait test{ public $var = "sa"; } class test2{ use test; public function myfunc(){ return $this->var; } } $obj = new test2; echo $obj->myfunc();
based on XCiff
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.2.8
sa