- microtime: documentation ( source)
- strtok: documentation ( source)
- number_format: documentation ( source)
<?php
$timestart = microtime( true );
$string = "This is an?example string";
for( $i=0; $i<=10; $i++ )
$result = strtok( $string, '?' );
$timeend = microtime( true );
$timetotal = $timeend - $timestart;
$r = number_format( $timetotal, 3 );
echo $r;
echo $result;