3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace XYZ\Model; interface user{ public function getName() : string; } class myUser implements user { public function getName() : string { return 'Mark'; } } $x = new myUser(); echo $x->getName();
based on HU4nC
Output for 7.0.0 - 7.3.0
Mark
Output for 5.5.0 - 5.6.38
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/pep1l on line 6
Process exited with code 255.