- substr: documentation ( source)
- microtime: documentation ( source)
- strrpos: documentation ( source)
- number_format: documentation ( source)
<?php
function conf_path() {
static $path;
if($path != null) {
return $path;
}
$path = '../sites/swissquote.eu.fx';
return $path;
}
$time = microtime(true);
$i=0;
while($i < 60000) {
$i++;
substr(conf_path(), strrpos(conf_path(), '/')+1);
}
$time = microtime(true) - $time;
echo 'substr() took ' . number_format($time, 3) . ' seconds';