Good all the time of day

I’m looking for a page loading script, but not simple ... hunting without any type of jquery, only on js, again without additional files and libraries. You can find this in the internet, but the problem is ... I don’t need to display the page load time, I just need to equate to a variable (say $load_time ), and I will decide myself whether it is necessary to have its "echo" or not. Does anyone have this?

  • You can "equate" php-variable to js. Not the other way around. At least during the page loading time without subqueries. - Sh4dow

1 answer 1

but not suitable

 <? $load_time_start = mktime(); //исполняемый код $load_time = mktime() - $load_time_start; ?> 
  • one
    mb microtime? - Sh4dow
  • If only seconds are important, then mktime (), and if microseconds are important, then microtime (1) must be set naturally. - korok
  • Although yes, probably microtime is better suited. - korok