I want to measure how long a specified part of my php script takes, e.g.
$startTime = microtime(true);
//some operations which needs 0.1 to 100 seconds to run
$endTime = microtime(true);
How can I get the duration in microseconds as an integer?
This does not work:
$duration = (int)($endTime - $startTime);