3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { } class A { public function M() { echo("this=" . get_class($this) . " hash=" . spl_object_hash($this) . "\n"); $x = "this"; $$x = new B(); echo("this=" . get_class($this) . " hash=" . spl_object_hash($this) . "\n"); } } $a = new A(); $a->M();
Output for git.master, git.master_jit, rfc.property-hooks
this=A hash=00000000000000010000000000000000 Fatal error: Uncaught Error: Cannot re-assign $this in /in/DDgo9:12 Stack trace: #0 /in/DDgo9(18): A->M() #1 {main} thrown in /in/DDgo9 on line 12
Process exited with code 255.

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.04 ms | 401 KiB | 8 Q