3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B{ static $bobo; } class A{ function __construct($a, $b, $c){ $this->a = $a; $this->b = $b; $this->c = $c; } function __destruct(){ B::$bobo = $this; } } $x = new A(10,20,30); var_dump($x); unset($x); var_dump(B::$bobo);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property A::$a is deprecated in /in/A1gkQ on line 9 Deprecated: Creation of dynamic property A::$b is deprecated in /in/A1gkQ on line 10 Deprecated: Creation of dynamic property A::$c is deprecated in /in/A1gkQ on line 11 object(A)#1 (3) { ["a"]=> int(10) ["b"]=> int(20) ["c"]=> int(30) } object(A)#1 (3) { ["a"]=> int(10) ["b"]=> int(20) ["c"]=> int(30) }

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:
32.29 ms | 402 KiB | 8 Q