$tstart = array_sum(explode(' ', microtime()));
$tend = array_sum(explode(' ', microtime()));echo "Tiempo: ".($tend - $tstart)." seg";