3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php interface SomeInterface { public function getSomeInterface() : SomeInterface; } class SomeClass implements SomeInterface { public function getSomeInterface() : SomeInterface { return $this; } } $object = new SomeClass(); var_dump($object->getSomeInterface());
based on YR7uU
Output for 7.0.0 - 7.2.0
object(SomeClass)#1 (0) { }
Output for 5.3.19 - 5.6.21
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/as4I1 on line 6
Process exited with code 255.