3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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);
Output for 4.3.0 - 4.3.6, 4.3.9 - 7.1.0
Array ( )
Output for 4.3.7 - 4.3.8