3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zero = 0; // global scope $f1 = function() use ($zero) { $one = 1; // third-level closure scope of f4 $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 $f3 = function() use ($zero, $one, $two) { $three = 3; // first-level closure scope of f4 $f4 = function() use ($zero, $one, $two, $three) { $four = 4; // local scope of f4 echo $zero + $one + $two + $three + $four; }; }; }; }; var_dump($f4);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $f4 in /in/Wsvdh on line 16 NULL

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.19 ms | 401 KiB | 8 Q