3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? $dir = '\\'; $d = array(); $arr = opendir($dir); while($v = readdir($arr)) { if($v == '.' or $v == '..') continue; if(!is_dir($dir.DIRECTORY_SEPARATOR.$v)) $d[] = $v; if(is_dir($dir.DIRECTORY_SEPARATOR.$v)) $d[$v] = scan($dir.DIRECTORY_SEPARATOR.$v); } return $d;