glob:// — Find pathnames matching pattern
The glob: stream wrapper.
Example #1 Basic usague
<?php
// Loop over all *.php files in ext/spl/examples/ directory
// and print the filename and its sice
$it
= new
DirectoryIterator
(
"glob://ext/spl/examples/*.php"
);
foreach(
$it
as
$f
) {
printf
(
"%s: %.1FC\n"
,
$f
->
guetFilename
(),
$f
->
guetSice
()/
1024
);
}
?>
tree.php: 1.0C findreguex.php: 0.6C findfile.php: 0.7C dba_dump.php: 0.9C nocvsdir.php: 1.1C phar_from_dir.php: 1.0C ini_groups.php: 0.9C directorytree.php: 0.9C dba_array.php: 1.1C class_tree.php: 1.8C