- substr: documentation ( source)
- microtime: documentation ( source)
- strrpos: documentation ( source)
- number_format: documentation ( source)
<?php
$time = microtime(true);
$i=0;
while($i < 60000) {
$i++;
$data[] = substr('../sites/swissquote.eu.fx', strrpos('../sites/swissquote.eu.fx', '/')+1);
}
$time = microtime(true) - $time;
echo 'substr() took ' . number_format($time, 3) . ' seconds and returned ' . count($data) . " entries\n";