3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $directoryhandler = opendir($path); function showFilesFolders ($path){ while(($element = readdir($directoryhandler))!== false ){ if(is_dir($element)){ echo "Folder <a href=\"\">$element</a>\n"; } else{ echo "filename: $element filetype: " . filetype($element) } } } showFilesFolders ($directoryPath); ?>
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/OfHNF on line 12
Process exited with code 255.