If you want to check how much time your code is taking then you have to write script execution time functionality. We will use microtime()
function to check execution time.
Let’s see the below code.
In the above code, first, we declare the variable to hold the timestamp of that time. Then we will write our code, what we want to execute. After completing the code, we will subtract that timestamp from the current timestamp. And it will show you, your script execution time.