3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 1; $f1 = fn() => $a = 2; $b = &$a; $f2 = fn() => $b = 3; echo $f1(); echo $a; echo PHP_EOL; echo $f2(); echo $a; echo PHP_EOL;
Output for git.master_jit, git.master
21 31

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:
45.97 ms | 833 KiB | 4 Q