From time time to time, I\'d like to be able to measure the elapsed time between two segments of code. This is solely to be able to detect the bottlenecks within the code an
Something along these lines should work:
$start = microtime(true); // Do something sleep(2); $end = (microtime(true) - $start); echo "elapsed time: $end";