#45265 [Opn->Ver]: stripos() very slow

From: Date: Sun, 10 Aug 2008 15:21:01 +0000
Subject: #45265 [Opn->Ver]: stripos() very slow
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127860@lists.php.net to get a copy of this message
 ID:               45265
 Updated by:       jani@php.net
 Reported By:      marc at phpmyadmin dot net
-Status:           Open
+Status:           Verified
 Bug Type:         Performance problem
 Operating System: Windows XP SP2
-PHP Version:      5.2.6
+PHP Version:      5.2CVS-2008-08-10


Previous Comments:
------------------------------------------------------------------------

[2008-06-13 17:44:20] marc at phpmyadmin dot net

Description:
------------
stripos() is very slow on Windows, about ten times slower than on
Linux. 

Reproduce code:
---------------
$a = str_repeat('x', 100000);
for ($i = 0; $i < 10000; $i++) {
        $b = stripos($a, 'y');
}


Expected result:
----------------
On Linux it takes about 3 secondes.

Actual result:
--------------
On Windows: 30 seconds


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45265&edit=1



Thread (9 messages)

« previous php.bugs (#127860) next »