3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function scanFileNameRecursivly($path = '', &$name = array() ) { $path = $path == ''? dirname(__FILE__) : $path; $lists = @scandir($path); if(!empty($lists)) { foreach($lists as $f) { if(is_dir($path.DIRECTORY_SEPARATOR.$f) && $f != ".." && $f != ".") { scanFileNameRecursivly($path.DIRECTORY_SEPARATOR.$f, &$name); } else { $name[] = $path.DIRECTORY_SEPARATOR.$f; } } } return $name; } var_dump(scanFileNameRecursivly('/'));
Output for 5.4.0 - 5.4.8
Fatal error: Call-time pass-by-reference has been removed in /in/EttHE on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/GHnaH on line 14 array(0) { }