Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

Weird Issue on a benchmark in PHP

I have wrote this snippet to test the time that it takes to cast a string to integer and I tried this one here for fun but the result was so interesting. <?php $s = "123456789"; $t = microtime(...
Mahdi Bagheri's user avatar
3 votes
1 answer
4k views

Measuring the time of PHP scripts - Using $_SERVER['REQUEST_TIME']

Are this methods a reliable way to measure a script: $time = ($_SERVER['REQUEST_TIME_FLOAT'] - $_SERVER['REQUEST_TIME']); or $time = (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']); Which one ...
Ash501's user avatar
  • 331
1 vote
1 answer
1k views

Measure total site loading time in PHP

I'm looking for a way to measure each step of a (HTTP) web request in php similar to Firebug's timeline or http://tools.pingdom.com. I can use a timer to measure the web requests, but I am looking ...
el Fo's user avatar
  • 9
154 votes
7 answers
104k views

How to benchmark efficiency of PHP script

I want to know what is the best way to benchmark my PHP scripts. Does not matter if a cron job, or webpage or web service. I know i can use microtime but is it really giving me the real time of a PHP ...
eric's user avatar
  • 2,518