Site icon Learn Web Development & Programming, Artificial Intelligence, WordPress, Shopify Articles

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