3v4l.org

run code in 300+ PHP versions simultaneously
<?php $listBinder = new class () { private $refs; function bind(&$p1, &$p2, &$p3) { $this->refs = [&$p1, &$p2, &$p3]; [$p1, $p2, $p3] = range(4, 6); } function change() { $this->refs[0] = 42; $this->refs[1] = 'foo'; $this->refs[2] = 'turtles all the way down'; } }; $list = [null, null, null]; $listBinder->bind(...$list); var_dump($list); $listBinder->change(); var_dump($list);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> &int(4) [1]=> &int(5) [2]=> &int(6) } array(3) { [0]=> &int(42) [1]=> &string(3) "foo" [2]=> &string(24) "turtles all the way down" }

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