3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test { static public function StaticRawr($name); { echo 'Rawr from static!'; if (!empty($name)) echo $name; } public $name = ''; public function Rawr() { echo 'Rawr! ' . $this->name; call_user_func(['self', 'StaticRawr'], $this->name); } } $rawrStatic = ['Test', 'StaticRawr']; $rawrStatic(); $testObj = new Test; $testObj->name = 'Вася'; $rawrObj = [$testObj, 'Rawr']; $rawrObj();
Output for 5.3.0 - 5.4.28
Fatal error: Non-abstract method Test::StaticRawr() must contain body in /in/AYcAV on line 5
Process exited with code 255.