Re: [SOLVED] Ticks and finding out where the script currently is.

From: Date: Thu, 01 May 2003 15:09:34 +0000
Subject: Re: [SOLVED] Ticks and finding out where the script currently is.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-145965@lists.php.net to get a copy of this message
O.k. just incase somebody is following this :) I have been playing and think that i have found the best way to do what i'm looking for. Attached is the functions required and you can use it like so: require_once('lib.profile.php'); register_tick_function('profile'); declare (ticks=75); function display_time ( ) { declare (ticks=0); print(profile(true)); } register_shutdown_function('display_time'); It can also be used without ticks as you just have to put profile(); where ever you want a trace to be captured and then use print(profile(true)); to display the output. Using profile(true) with printing it will cause it to clear the current list. Just out of interest my php scripts seem to run a lot slower when ticks are enabled does anybody know what effect ticks has on a script? -- Regards, William Bailey. Pro-Net Internet Services Ltd. http://www.pro-net.co.uk http://wb.pro-net.co.uk

Attachment: [text/x-csrc] lib.profile.php
« previous php.general (#145965) next »