Addmarker ("Start");} // end function start () // call this function stop () at the end of the script () {// see the addmarker function $ this-> addmarker ("Stop");} // end function stop () // This function is used to add a flag when the script is executed. // you need a name called function addmarker ($ name) {// call the jointime () function and set the microtime () $ markertime = $ this-> jointime (microtime (); // $ AE returns the size of the current array, that is, the current insert position // currently in the $ points array $ AE = count ($ this-> points ); // store timestamp and description in the array $ this-> points [$ AE] [0] = $ markertime; $ this-> points [$ AE] [1] = $ name;} // end function addmarker () // this function will process () returned string function jointime ($ mtime) {// decomposition string $ timeparts = explode ("", $ mtime); // connects two strings, and remove the decimal part 0 $ finaltime = $ timeparts [1]. substr ($ timeparts [0], 1); // return the connected string return $ finaltime;} // end function jointime () // this function simply displays the time required from the start to the end function showtime () {echo bcsub ($ this-> points [count ($ this-> points) -1] [0], $ this-> points [0] [0], 6);} // end function showtime () // This function displays all information collected during Script running. function debug () {echo "Script execution debug information:"; echo ""; // This table has three columns: Marker name, Timestamp, and difference echo"MarkerTimeDiff"; // The first line is the echo without running time difference" "; echo "". $ this-> points [0] [1]. ""; echo "". $ this-> points [0] [0]. ""; echo "-"; echo ""; // It is displayed cyclically starting from element 1 of the array, and 0 has been displayed for ($ I = 1; $ I <count ($ this-> points); $ I ++) {echo ""; echo "". $ this-> points [$ I] [1]. ""; echo "". $ this-> points [$ I] [0]. ""; echo ""; // display the time difference between the upper and lower rows echo bcsub ($ this-> points [$ I] [0], $ this-> points [$ I-1] [0], 6); echo ""; echo "";} echo "" ;}// end function debug ()} // End class PHP_timer?>