- Output for 7.1.25 - 7.1.30, 7.2.0 - 7.2.20, 7.3.0 - 7.3.7
- Fatal error: Constructor Foo::__construct() cannot declare a return type in /in/rsikK on line 3
Process exited with code 255.
<?php
class Foo
{
public function __construct() : Foo
{
return "bar";
}
}
$foo = new Foo();
var_dump($foo);