3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rglob($pattern, $flags = 0, $path = '') { if (!$path && ($dir = dirname($pattern)) != '.') { if ($dir == '\\' || $dir == '/') $dir = ''; return rglob(basename($pattern), $flags, $dir . '/'); } $paths = glob($path . '*', GLOB_ONLYDIR | GLOB_NOSORT); $files = glob($path . $pattern, $flags); foreach ($paths as $p) $files = array_merge($files, rglob($pattern, $flags, $p . '/')); return $files; } $fileList = rglob("*", GLOB_MARK, '/etc/'); foreach($fileList as $index => $file) { if($file[strlen($file) - 1] != "/") { echo "f: ".$file."\n"; } else echo "d: ".$file."\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
f: /etc/arch-release f: /etc/crypttab f: /etc/fstab f: /etc/group f: /etc/gshadow f: /etc/host.conf f: /etc/hosts f: /etc/issue f: /etc/ld.so.conf d: /etc/ld.so.conf.d/ f: /etc/motd f: /etc/nsswitch.conf d: /etc/pacman.d/ f: /etc/passwd f: /etc/php.ini f: /etc/php_archive.ini f: /etc/profile d: /etc/profile.d/ f: /etc/protocols f: /etc/resolv.conf f: /etc/securetty f: /etc/services f: /etc/shadow f: /etc/shells d: /etc/skel/ f: /etc/pacman.d/mirrorlist f: /etc/profile.d/locale.sh

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