PHP Speed check

Discussion in 'PHP' started by linderman, Feb 21, 2009.

  1. #1
    Hello folks,

    do someone knows tool or Firefox plugin , which can show me how fast is the script i am running. I mean , to show me the seconds needed from the server to execute it?

    Thank you.
     
    linderman, Feb 21, 2009 IP
  2. Pos1tron

    Pos1tron Peon

    Messages:
    95
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you just want it for one script, you can display it by putting this at the start of the script:
    <?php
    
    $startTime = microtime(TRUE);
    
    ?>
    PHP:
    then at the end:
    <?php
    
    echo  microtime(TRUE) - $startTime;
    
    ?>
    PHP:
    Or take a look at PEAR's benchmarking.
     
    Pos1tron, Feb 21, 2009 IP