3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public $a; function __construct($a = 0) { $this->this = &$this; $this->a = $a; if ($a !== 0) { $this->this = new a(); } echo __METHOD__." :: ".$this->a."\n"; } } $a = new a(10); echo "a = ".$a->a."\n";
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property a::$this is deprecated in /in/h5oIM on line 8 Deprecated: Creation of dynamic property a::$this is deprecated in /in/h5oIM on line 8 a::__construct :: 0 a::__construct :: 10 a = 10

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:
38.69 ms | 401 KiB | 8 Q