3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public $bar; } class Foo { /** * @var Bar */ public $bar; } $bar = new Bar(); $bar->bar = 'BAR'; $foo = new Foo(); $foo->bar = $bar; $clonedFoo = clone($foo); assert($clonedFoo !== $foo); assert($clonedFoo->bar !== $foo->bar);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught AssertionError: assert($clonedFoo->bar !== $foo->bar) in /in/NY7mp:25 Stack trace: #0 /in/NY7mp(25): assert(false, 'assert($clonedF...') #1 {main} thrown in /in/NY7mp on line 25
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:
51.98 ms | 401 KiB | 8 Q