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 { debug_print_backtrace(); return $this; } } $object = new SomeClass(); var_dump($object->getSomeInterface());
based on WklBe
Output for 7.0.0 - 7.2.0
#0 SomeClass->getSomeInterface() called at [/in/JW8P9:26] object(SomeClass)#1 (0) { }
Output for 5.3.19 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/JW8P9 on line 8
Process exited with code 255.