<?php class Foo { protected $foo; public function __construct(Foo $foo = null) { if($foo == null) { $foo = new Foo($this); } $this->foo = $foo; } } $a = new Foo(); print_r($a);
You have javascript disabled. You will not be able to edit any code.