3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Passing as reference $variable = "broken"; $callback = function() use( &$variable) { $variable = "working"; }; $callback(); // Not passing by reference $variable2 = "broken"; $callback2 = function() use( $variable2) { $variable2 = "working"; }; $callback2(); echo "var1 = $variable , var2 = $variable2";
Output for git.master, git.master_jit, rfc.property-hooks
var1 = working , var2 = broken

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