$start = microtime(true);<br><br>/* your function stuff here */<br><br>$end = microtime(true);<br>$time = $time_end - $time_start;<br><br>echo "$time seconds";<br><br><a href="http://php.net/manual/en/function.microtime.php">http://php.net/manual/en/function.microtime.php</a><br>
<br><div class="gmail_quote">On 21 October 2011 13:01, alan dunn <span dir="ltr"><<a href="mailto:alan@dunns.co.uk">alan@dunns.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#FFFFFF" text="#000000">
<font face="Helvetica, Arial, sans-serif">I want to measure the
execution time for a function - it is to determine a price given
quantity discounts, promotion prices etc. <br>
<br>
Can anyone give me tips on how to do that?<br>
<br>
More generally I have the options of running a php function - or
creating a database function in plpgsql to do the same thing.
Someone might have a view about their relative speeds? <br>
<br>
thanks, alan dunn<br>
</font>
</div>
<br>_______________________________________________<br>
Phpwm mailing list<br>
Website : <a href="http://www.phpwm.org" target="_blank">http://www.phpwm.org</a><br>
Twitter : <a href="http://www.twitter.com/phpwm" target="_blank">http://www.twitter.com/phpwm</a><br>
Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907" target="_blank">http://www.facebook.com/group.php?gid=2361609907</a><br>
<br>
Post to list: <a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br></blockquote></div><br>