3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rec($dir, $depth, $root) { $dir = dir('/dev/fd'); while ($entry = $dir->read()) { echo $depth . $entry . "\n"; if (is_dir($root . $entry)) { rec($dir, $depth . " ", $root . '/' . $entry); } } } rec('/', '', '/');

Abusive script

This script was stopped while abusing our resources


preferences:
32.66 ms | 402 KiB | 5 Q