3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = function () { echo 'hello world'; }; function closure_dump($closure) { try{ $func = new ReflectionFunction($closure); } catch (ReflectionException $e) { echo $e->getMessage(); return; } $start = $func->getStartLine() - 1; $end = $func->getEndLine() - 1; $filename = $func->getFileName(); echo implode("", array_slice(file($filename),$start, $end - $start + 1)); } closure_dump($test);
Output for git.master, git.master_jit, rfc.property-hooks
$test = function () { echo 'hello world'; };

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