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); } } echo $items;
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/eCFc6 on line 11 Array
Output for 4.3.0 - 4.3.6, 4.3.9 - 5.3.29
Array
Output for 4.3.7 - 4.3.8