Hi!
I have done some profiling on a site and found that strtolower calls took unexpectedly long time.
The context is
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.
I then tried the function in the following context
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
There is a notable difference between the two. It's no biggie overall of course but I'm still confused.