- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.31
- Fatal error: Cannot redeclare Foo::__construct() in /in/0Ircv on line 13
Process exited with code 255.
<?php
class Foo
{
protected $foo;
public function __construct(Foo $foo = null) {
if($foo == null) {
$foo = new Foo($this);
}
$this->foo = $foo;
}
public function __construct(Foo $foo = null) {
$this->Foo($foo);
}
}
$a = new Foo();
print_r($a);