3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface Vendor { public function make() : string; } class Samsung implements Vendor{ public function make() { return "This is Samsung product"; } } $vendor = new Samsung(); echo $vendor->make();
based on 80XK5
Output for 7.0.0 - 7.2.0
Fatal error: Declaration of Samsung::make() must be compatible with Vendor::make(): string in /in/CJV0X on line 6
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/CJV0X on line 3
Process exited with code 255.