PHP 8.5.0 Alpha 4 available for testing

Voting

: min(three, zero)?
(Example: nine)

The Note You're Voting On

alvaro at demogracia dot com
16 years ago
Usage example:

<?php

$path
= realpath('/etc');

$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach(
$objects as $name => $object){
echo
"$name\n";
}

?>

This prints a list of all files and directories under $path (including $path ifself). If you want to omit directories, remove the RecursiveIteratorIterator::SELF_FIRST part.

<< Back to user notes page

To Top