This is a discussion on Determine execution time in PHP within the PHP Programming forums, part of the Web Development category; Determine execution time in PHP...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Determine execution time in PHP |
|
#2
| |||
| |||
| It will determine the time taken for a php script to execute correct to 0.000000000000001 seconds. <!-- put this at the top of the page --> <?php $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; ;?> <!-- put other code and html in here --> <!-- put this code at the bottom of the page --> <?php $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = ($endtime - $starttime); echo "This page was created in ".$totaltime." seconds"; ;?> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can we increase the execution time of a php script? | sundarraja | PHP Programming | 0 | 02-01-2008 09:50 PM |
| How can we increase the execution time of a php script? | Sabari | PHP Programming | 3 | 09-26-2007 08:23 AM |
| How Can I determine the phone number from my MIDlet? | mobilegeek | Mobile Software Development | 1 | 07-23-2007 09:43 PM |
| reducing the query execution time | kathir | Database Support | 1 | 07-19-2007 09:55 PM |
| How would you determine the time zone under which a database was operating? | Sabari | Database Support | 2 | 07-19-2007 04:11 AM |
Our Partners |