- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
- Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/WklBe on line 6
Process exited with code 255.
<?php
interface SomeInterface
{
public function addSomething($something) : null;
public function getSomeInterface() : SomeInterface;
}
class SomeClass implements SomeInterface
{
public function getSomeInterface() : SomeInterface
{
debug_print_backtrace();
return $this;
}
}
$object = new SomeClass();
var_dump($object->getSomeInterface());