Hi,
Please consider the below code.
<html>
<body>
<?php
$time1 = localtime();
echo $time1[0];
echo("<br /><br />");
/* HERE SOME CODES RELATED TO CERTAIN FUNCTIONS LIKE DISPLAYING OF SOME IMAGE ETC. IS EXECUTED. APPROXIMATELY IT TAKES 10 SECONDS FOR THE COMPLETE EXECUTION OF THESE FUNCTIONS. SINCE IT IS IRRELEVANT TO MY QUESTION, I REMOVED THEM FOR THE SAKE OF KEEPING THIS PIECE OF CODE SIMPLE. */
echo("<br /><br />");
$time1 = localtime();
echo $time1[0];
?>
</body>
</html>
OK, now I get the following output when I execute the above code:
48
**** THE OUTPUT OF THE FUNCTIONS LIKE LOADING CERTAIN IMAGES. NOTE: IT TAKES APPROX. 10 SECONDS FOR THIS OUTPUT TO COMPLETELY APPEAR ON THE SCREEN
48
Now, my question is:
In the beginning and ending of the code, I echoed localtime()[0] which displays the 'seconds' value of the current time. But in the middle of the code, I executed certain functions which took approx. 10 seconds to get executed. Then how come localtime()[0] present in the ending outputted the same value which it outputted in the beginning??