Site icon Tutorials Website: Upgrade Your Web Development & Coding Skills

How can I measure the speed of code written in PHP?

$startTime= microtime(true);
/** Write here you code to check **/
/** Write here you code to check **/
$endTime= microtime(true);
echo ‘Time Taken to execute the code:’.$endTime-$startTime

Exit mobile version