3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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);
Output for 5.3.0 - 5.4.31
Fatal error: Cannot redeclare Foo::__construct() in /in/0Ircv on line 13
Process exited with code 255.