3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php Interface wut { public function foo( $yolo ); } class dude implements wut { public function foo ( $yolo ): string { return $yolo; } } $x = new dude(); echo $x->foo(2);
based on YLNLf
Output for hhvm-3.15.4, 7.0.0 - 7.3.0rc3
2
Output for 5.6.0 - 5.6.30
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/kJ0Ee on line 8
Process exited with code 255.