3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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'); }

Abusive script

This script was stopped while abusing our resources