Count number of lines executed

Discussion in 'PHP' started by plussy, Oct 12, 2012.

  1. #1
    Does anyone know if php has a build in functionality of detecting how many lines of code have been executed?
     
    plussy, Oct 12, 2012 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    The server compiles the php code before executing so the number of lines is irrelevant to execution. Is there a specific reason you are wanting a stat like this?
     
    jestep, Oct 12, 2012 IP
  3. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #3
    This can easily be achieved by implementing PHPUnit testing:

    http://www.phpunit.de/manual/current/en/

    Its easily to install. The only drawback, well its not really a drawback, is you will need to create unit tests for your code, which is a good thing.
     
    ThePHPMaster, Oct 15, 2012 IP