mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
159c538bcf
- Remove all overloading hooks -> array_read/array_access must be rewritten - Remove all basic iterators - Remove all 'spl_' prefixing exposed to user level - Add RecursiveIterator, RecursiveIteratorIterator - Add DirectoryIterator, DirectoryTreeIterator - Add some examples
17 lines
327 B
PHP
Executable File
17 lines
327 B
PHP
Executable File
<?php
|
|
|
|
/** tree view example
|
|
*
|
|
* Usage: php DirectoryTree.php <path>
|
|
*
|
|
* Simply specify the path to tree with parameter <path>.
|
|
*
|
|
* (c) Marcus Boerger
|
|
*/
|
|
|
|
$length = $argc > 3 ? $argv[3] : NULL;
|
|
foreach(new LimitIterator(new DirectoryTree($argv[1]), @$argv[2], $length) as $pathname => $file) {
|
|
echo "$pathname\n";
|
|
}
|
|
|
|
?>
|