performance - PHP Ghost Process Timing -


i've got list of functions timing might try , optimize code:

$totaltime = microtime(true);  $time = microtime(true); // function 1 .05 seconds $func_1_time = microtime(true) - $time;  $time = microtime(true); // function 2 .05 seconds $func_2_time = microtime(true) - $time;  $time = microtime(true); // function 3 .05 seconds $func_3_time = microtime(true) - $time;  $time = microtime(true); // function 4 .05 seconds $func_4_time = microtime(true) - $time;  $timetotals = $func_1_time + $func_2_time + $func_3_time + $func_4_time;  $totaltime = microtime(true) - $totaltime; 

this giving me result like:

// timetotals .2 expected // totaltime 2.3939 ??? 

i can't imagine running microtime(true) function adding time... be? or happening in background not aware of in between each function?


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -