$start = microtime(true); $elapsed = microtime(true) - $start; echo "That took $elapsed seconds.<br>";