<?php

// Wrong
$start = microtime();
sleep(3);
$stop = microtime();
echo ($stop - $start) . PHP_EOL;

// Correct
$start = microtime(true);
sleep(3);
$stop = microtime(true);
echo ($stop - $start) . PHP_EOL;

?>