|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-04-01 10:59 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2017-04-01 10:59 UTC] requinix@php.net
[2017-04-01 13:57 UTC] bwoebi@php.net
-Status: Feedback
+Status: Wont fix
[2017-04-01 13:57 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Description: ------------ When FilesystemIterator iterates through folder with many files, it doubles file entries at 65535th and, more generally, 65535*n+(n-1) positions (131071,196607...). ... 65533.txt 65534.txt // ok 65534.txt // omg what happened with my file system, is it broken? But chkdsk shows nothing bad. Oh well, it's just iterator... 65535.txt 65536.txt ... 7.0.0 and later versions work fine. Test script: --------------- 1) to generate many files in one folder use batch like for /l %a in (1 1 200000) do type nul > "%a.txt" 2) $path = 'd:\pathtoyour\folder'; $items = new FilesystemIterator($path,FilesystemIterator::CURRENT_AS_PATHNAME); $n = 0; $name = ''; foreach ($items as $item) { $name_prev = $name; $name = basename($item); $n++; if ($name == $name_prev) echo "DUPILCATE ENTRY FOUND AT $n: $name <br>"; }