I came across this thread on SO which talks about PHP code coverage tools - Code Coverage tools for PHP
I have never worked on PHP and have been writing Selenium UI
Just add an auto-prepend script which calls xdebug_start_code_coverage() and registers a shutdown function which logs the output of xdebug_get_code_coverage()
Then analyse your data later.