3v4l.org

run code in 300+ PHP versions simultaneously
<?php $o= new stdclass; $o->a= 'b'; $o->b= 'c'; $o2= $o; $o2->a= 'd'; var_dump($o); var_dump($o2); $o2->b = 'foo'; var_dump($o); var_dump($o2); $o3= clone $o; $o3->a= 'e'; var_dump($o); var_dump($o3);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#1 (2) { ["a"]=> string(1) "d" ["b"]=> string(1) "c" } object(stdClass)#1 (2) { ["a"]=> string(1) "d" ["b"]=> string(1) "c" } object(stdClass)#1 (2) { ["a"]=> string(1) "d" ["b"]=> string(3) "foo" } object(stdClass)#1 (2) { ["a"]=> string(1) "d" ["b"]=> string(3) "foo" } object(stdClass)#1 (2) { ["a"]=> string(1) "d" ["b"]=> string(3) "foo" } object(stdClass)#2 (2) { ["a"]=> string(1) "e" ["b"]=> string(3) "foo" }

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