3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Father { protected $name = 'foo'; protected function getMember() { return $this->name; } } class Child extends Father { use OverrideMemberVisibility; public function getMember() { return parent::getMember(); }; } trait OverrideMemberVisibility{ abstract public function getMember(); } $child = new Child; echo $child->getMember();
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected ';', expecting function (T_FUNCTION) in /in/TeJCF on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_USE, expecting T_FUNCTION in /in/TeJCF on line 12
Process exited with code 255.