3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { protected $bar; function __construct(Foo $foo = null) { if($foo == null) { $foo = new Foo($this); } $this->bar = $foo; } 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/aV2pR on line 13
Process exited with code 255.