3v4l.org

run code in 300+ PHP versions simultaneously
<? function getPrivateHeadersInArray($parentDirectory) { if ($handle = opendir("$parentDirectory")) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") && !is_dir($file)) { chdir("$parentDirectory"); //to make sure you are always in right directory $holdcontents = file_get_contents($file); $items[] = get_header($holdcontents); } if(is_dir($file) && ($file != "." && $file != "..")) { $holdpwd = getcwd(); $newdir = "$holdpwd"."/$file"; getPrivateHeadersInArray($newdir); } } closedir($handle); } return $items; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
<? function getPrivateHeadersInArray($parentDirectory) { if ($handle = opendir("$parentDirectory")) { while (false !== ($file = readdir($handle))) { if (($file != "." && $file != "..") && !is_dir($file)) { chdir("$parentDirectory"); //to make sure you are always in right directory $holdcontents = file_get_contents($file); $items[] = get_header($holdcontents); } if(is_dir($file) && ($file != "." && $file != "..")) { $holdpwd = getcwd(); $newdir = "$holdpwd"."/$file"; getPrivateHeadersInArray($newdir); } } closedir($handle); } return $items; } ?>

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:
57.79 ms | 402 KiB | 8 Q