3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface MyInterface { public function setValue($object, $value); } class MyObject { } class Component implements MyInterface { public function setValue(MyObject $object, string $value); }
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.1.6
Fatal error: Non-abstract method Component::setValue() must contain body in /in/UcYln on line 13
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Non-abstract method Component::setValue() must contain body in /in/UcYln:13 Stack trace: #0 {main}
Process exited with code 255.