Ben bir sitede bazı profil yapılır ve strtolower aramalar beklenmedik şekilde uzun zaman aldı bulduk.
Bağlamıdır
function __autoload($class_name) {
require_once('app/model/' . strtolower($class_name) . '.php');
}
And the result is
0.0092 -> __autoload() C:\xxx\config.php:0_
0.0093 -> strtolower() C:\xxx\config.php:77
0.0101 -> require-once(C:\xxx.php) C:\xxx\config.php:77
I've seen this on several places in the trace file.
Daha sonra, aşağıdaki bağlamında işlevini güvenilir
for($i=0;$i<100;$i++) {
strtolower('SomeStRIng' . $i)
}
And the result was
0.0026 -> strtolower() C:\xxx\index.php:53
0.0027 -> strtolower() C:\xxx\index.php:53
0.0027 -> strtolower() C:\xxx\index.php:53
0.0027 -> strtolower() C:\xxx\index.php:53
Ikisi arasında kayda değer bir fark vardır. Elbette hayır biggie genel ama ben yine kafam karıştı.