<?php
declare(strict_types=1);
class Foo {
private $x;
public function setX($x)
{
$this->x = $x;
}
public function getX()
{
return $this->x;
}
}
function test() : Foo
{
return new Foo;
}
var_dump(test());
Warning: Unsupported declare 'strict_types' in /in/qbOaO on line 3
Parse error: syntax error, unexpected ':', expecting '{' in /in/qbOaO on line 19
Process exited with code 255.