3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = glob('./*'); for ($i = 0; $i < count($items); $i++) { if (is_dir($items[$i])) { $add = glob($items[$i] . '/*'); $items = array_merge($items, $add); } } print_r($items);

preferences:
50.81 ms | 402 KiB | 5 Q