3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Interface wut { public function foo( string $yolo ) { } } class dude implements wut { public function foo ( int $yolo = 2) { echo $yolo; } } $x = new dude(); $x->foo();
based on 5lqT1
Output for 7.0.0 - 7.1.7
Fatal error: Interface function wut::foo() cannot contain body in /in/0rBQ6 on line 4
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Interface method wut::foo() cannot contain body in /in/0rBQ6:4 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Interface function wut::foo() cannot contain body in /in/0rBQ6 on line 5
Process exited with code 255.