php - Global loops spin counter -


is there way count, how many spins loops has php file , files included in it?

i write simple framework , want keep statistics of rotations made of loops.

include "fiveloops.php"; // 250 spins   while(true){     break;     // 1 spin;  }  for($i=0;$i<10;$i++){     // 10 spins;   }       // total spins 261 

is there has feature built language give me such information.

there no built-in function in php yet keep statistics of rotations made of loops. hence, need use counter stored in file includes function.

to store variable , include variable in different php page, function page, want use session variable. default, session variable stores variable on server, not on clients cookies around 1 hour.

you instance have $_session['count'] , initiate 0 in file loop occur.

when working session important start session using session_start , put @ top of every file using session.

on function page, want retrieve session variable , increment accordingly inside while loop.


Comments