3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $b; public function __construct() { $this->b = new B($this); } } class B { private $a; public function __construct(A $a) { $this->a = $a; } } $a=new A(); var_dump($a); var_export($a); print_r($a);
Output for git.master, git.master_jit, rfc.property-hooks
object(A)#1 (1) { ["b":"A":private]=> object(B)#2 (1) { ["a":"B":private]=> *RECURSION* } } Warning: var_export does not handle circular references in /in/P35SH on line 24 \A::__set_state(array( 'b' => \B::__set_state(array( 'a' => NULL, )), ))A Object ( [b:A:private] => B Object ( [a:B:private] => A Object *RECURSION* ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
58.08 ms | 402 KiB | 8 Q