note 76021 added to function.microtime

From: Date: Tue, 26 Jun 2007 23:24:40 +0000
Subject: note 76021 added to function.microtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-128007@lists.php.net to get a copy of this message
here's an ultra simple script for you all (PHP5 only.. for obvious reasons) stick this at the top of any script or app, and you'll get a the execution time in microseconds of the script. It will output in raw text at the foot of the output, after execution has finished.. so only really useful for developing (swap the print_r for a logging function for live use?) <? class pageExecutionTimer { private $executionTime; public function __construct() { $this->executionTime = microtime(true); } public function __destruct() { print_r(chr(10).chr(13).(microtime(true)-$this->executionTime)); } } $pageExecutionTimer = new pageExecutionTimer(); ?> ---- Server IP: 194.145.210.3 Probable Submitter: 82.23.133.0 ---- Manual Page -- http://www.php.net/manual/en/function.microtime.php Edit -- https://master.php.net/note/edit/76021 Del: integrated -- https://master.php.net/note/delete/76021/integrated Del: useless -- https://master.php.net/note/delete/76021/useless Del: bad code -- https://master.php.net/note/delete/76021/bad+code Del: spam -- https://master.php.net/note/delete/76021/spam Del: non-english -- https://master.php.net/note/delete/76021/non-english Del: in docs -- https://master.php.net/note/delete/76021/in+docs Del: other reasons-- https://master.php.net/note/delete/76021 Reject -- https://master.php.net/note/reject/76021 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128007) next »