Re: Getting the parsing time of a script

From: Date: Sat, 31 May 2003 12:32:34 +0000
Subject: Re: Getting the parsing time of a script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149645@lists.php.net to get a copy of this message
At 12:39 31.05.2003, Bix said: --------------------[snip]-------------------- >Is there any way getting the time taken to parse a script? > >IE: > >This page took 0.13 seconds to generate. > >Is it a predefined variable anywhere? --------------------[snip]-------------------- $start = microtime(); for ($i = 0; $i < 10000; ++$i) $n = getdate(time()); $end = microtime(); list($s0, $s1) = explode(' ', $start); list($e0, $e1) = explode(' ', $end); echo sprintf('<hr>This page took %.2f seconds to generate', ($e0+$e1)-($s0+$s1)); -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#149645) next »