3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $prop; } $foo = new Foo(); $str = 'abc'; // $str is a string $foo->prop = &$str; var_dump($foo->prop); // "abc" $arr = array(); $foo->prop = $arr; var_dump($foo->prop); // array() var_dump($str); // array() - surprise! $str is now an array
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "abc" array(0) { } array(0) { }

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:
60.65 ms | 405 KiB | 5 Q