3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rglob($pattern, $flags = 0) { $files = glob($pattern, $flags); foreach(glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) { $files = array_merge($files, rglob($dir.'/'.basename($pattern), $flags)); } return $files; } foreach(rglob(getcwd().'/*', GLOB_ONLYDIR) as $f){ printf("<h1>dir: %s perms: %s writable: %s</h1><br>", $f, substr(sprintf('%o', fileperms($f)), -4), is_writable($f) ? 'True' : 'False'); }
Output for git.master_jit, git.master, rfc.property-hooks
<h1>dir: /etc perms: 0755 writable: False</h1><br><h1>dir: /in perms: 0755 writable: False</h1><br><h1>dir: /tmp perms: 1777 writable: True</h1><br><h1>dir: /etc/ld.so.conf.d perms: 0755 writable: False</h1><br><h1>dir: /etc/pacman.d perms: 0755 writable: False</h1><br><h1>dir: /etc/profile.d perms: 0755 writable: False</h1><br><h1>dir: /etc/skel perms: 0755 writable: False</h1><br>

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