|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-02-01 10:47 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 13:00:02 2025 UTC |
Description: ------------ Looks like glob:// appends the filenames, rather than replacing the pattern with the filename.. Reproduce code: --------------- <?php $it = new DirectoryIterator("glob://ext/spl/examples/*.php"); foreach($it as $f) { printf("%s: %.1FK\n", $f->getFilename(), $f->getSize()/1024); } Expected result: ---------------- class_tree.php: 1.8K tree.php: 1.0K findregex.php: 0.6K findfile.php: 0.7K dba_dump.php: 0.9K nocvsdir.php: 1.1K phar_from_dir.php: 1.0K ini_groups.php: 0.9K directorytree.php: 0.9K dba_array.php: 1.1K Actual result: -------------- PHP Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::getSize(): stat failed for glob://ext/spl/examples/*.php/class_tree.php' in /home/bjori/php/5.3/-:6 Stack trace: #0 /home/bjori/php/5.3/-(6): SplFileInfo->getSize() #1 {main} thrown in /home/bjori/php/5.3/- on line 6