[php-src] Issue #14689: glob wrapper not work on windows ?!

From: Date: Thu, 27 Jun 2024 14:07:31 +0000
Subject: [php-src] Issue #14689: glob wrapper not work on windows ?!
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247160@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14689 Author: tsybot ### Description The following code: ```php <?php $it = new DirectoryIterator("glob://C:\\"); var_dump($it); foreach($it as $f) { echo $f->getFilename()."\n"; } $it = new DirectoryIterator("C:\\"); var_dump($it); foreach($it as $f) { echo $f->getFilename()."\n"; } ``` Resulted in this output: ``` object(DirectoryIterator)#1 (3) { ["pathName":"SplFileInfo":private]=> string(0) "" ["glob":"DirectoryIterator":private]=> string(9) "glob://C:" ["subPathName":"RecursiveDirectoryIterator":private]=> string(0) "" } object(DirectoryIterator)#1 (4) { ["pathName":"SplFileInfo":private]=> string(15) "C:\$Recycle.Bin" ["fileName":"SplFileInfo":private]=> string(12) "$Recycle.Bin" ["glob":"DirectoryIterator":private]=> bool(false) ["subPathName":"RecursiveDirectoryIterator":private]=> string(0) "" } pagefile.sys Program Files Program Files (x86) ProgramData Users Windows ... ``` So, glob:// wrapper not working on windows or im a wrong ? ### PHP Version PHP 8.0.22 ### Operating System Windows Server 2022

« previous php.bugs (#247160) next »