About the microtime () function, I used the microtime () function to get the current time at the beginning and end of the program, and then subtract the program running time. There is no problem in php 5.2, however, in versions 5.3, 5.4, and 5.5, the result of the php subtraction is either 0 or 0.0156, which is completely different from that in version 5.2.6. what is the problem?
Reply to discussion (solution)
Paste your code
$ StartTime = microtime (true); printf ("%. 53f", microtime (true)-$ startTime );
For example, in the two sentences, a value is output every time in Version 5.2, but in other versions, all the values are 0.
$ StartTime = microtime (true); for ($ I = 0; $ I <1000000; $ I ++) {$ a = 1;} printf ("%. 16f ", microtime (true)-$ startTime );0.0468750000000000
This is the power of the version.
You can change the final value of the loop so that all versions have output
Then you will find that every time you increase a version number, the time will be reduced by at least one order of magnitude.
The running time of different versions is normal.
The higher version is optimized than the lower version. of course, the time is much less.
Thank you for learning.