Does anyone know if php has a build in functionality of detecting how many lines of code have been executed?
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?
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.