3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $x = 2; function test() { global $a; global $x; $GLOBALS['a'] = &$x; $x = 5; echo $a . PHP_EOL; echo $x . PHP_EOL; } test(); echo PHP_EOL; echo $a . PHP_EOL; // $a is 1 here instead of 5 echo $x . PHP_EOL; $a = &$x; echo PHP_EOL; echo $a . PHP_EOL; echo $x . PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
1 5 5 5 5 5

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