3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function rec($dir, $depth) { $d = dir($dir); if (!$d) return; while ($entry = $d->read()) { if ($entry == '.' || $entry == '..') continue; echo $depth . $entry . "\n"; if (is_dir($dir . '/' . $entry)) { rec($dir . '/' . $entry, $depth . " "); } } } rec('/usr', '');
based on QqHlp

Abusive script

This script was stopped while abusing our resources