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

[email protected]
Newsgroups php.bugs
Message-ID <[email protected]>
 ID:               45265
 Updated by:       [email protected]
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.