|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #35482 Bad performance of filesystem functions on Windows XP Professional
Submitted: 2005-11-30 01:25 UTC Modified: 2013-10-15 12:12 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: tobias-bender at web dot de Assigned: pajoye (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.1.1 OS: Windows XP Professional
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tobias-bender at web dot de
New email:
PHP Version: OS:


 [2005-11-30 01:25 UTC] tobias-bender at web dot de
All filesystem functions got much slower with PHP 5.x.
With short relative paths PHP 4 is about twice as fast as PHP 5. PHP 5 is nearly 10 times slower when using absolute paths compared to PHP 4.

Reproduce code:
function getMicrotime(){
  list($usec, $sec) = explode(' ', microtime());
  return ((float)$usec + (float)$sec);

$iTime = getMicrotime();

$rHandle = opendir('C:/Apache2/htdocs/phpXplorer/test/vollvoll');

while (false !== ($sName = readdir($rHandle))) {
  if (is_dir('C:/Apache2/htdocs/phpXplorer/test/vollvoll/' . $sName)){
    echo 'C:/Apache2/htdocs/phpXplorer/test/vollvoll/' . $sName . '<br/>';

echo getMicrotime() - $iTime;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-30 10:30 UTC]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

Can't reproduce on Linux.
 [2005-12-01 00:03 UTC] tobias-bender at web dot de
I think this has to be analysed on a Windows platform
 [2005-12-01 13:11 UTC]
Comparing PHP 5 with PHP 4 is like comparing apples and oranges. This is inherent problem in Windows, not a bug.
 [2005-12-02 05:26 UTC] tobias-bender at web dot de
I know but a difference of 1:9 is not normal. This might be not a real bug but has to be kept in mind when working on the code. I think there could be done a lot of optimization.
Where to put an issue like that when the bug db is not the right place?
 [2005-12-02 09:48 UTC]
Wez, can you check this out, it's mainly your code anyway. :)
 [2010-12-20 14:15 UTC]
-Package: Feature/Change Request +Package: Filesystem function related -Assigned To: wez +Assigned To: pajoye
 [2013-01-08 07:18 UTC]
solved in latest 5 serie, cleaning up by closing it.
 [2013-10-15 12:12 UTC]
-Status: Assigned +Status: Closed
 [2013-10-15 12:12 UTC]
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Dec 04 09:05:54 2022 UTC