Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Whilst working in some other languages, (primarily Java and C++), I have come across useful tools that enable you to compile your program in a certain way that allows you to examine what source code has been called/run whilst the program was running. You then run your regression tests and check that all the code you just added/changed had been exercised.

Does anybody know of a similar tool/programming design in order to do the same thing with PHP web pages and scripts? This would be a great help in preventing bugs slipping through in obscure parts of code that you don't realize never got tested.

Any input appreciated as always

share|improve this question

1 Answer 1

  • phpUnit is the standard PHP testing tool, and it includes code coverage analysis. It will tell you how much of your code is covered by your unit tests.

  • xDebug is the most popular PHP debugging tool. It includes a profiler, which can generate full call profiles of a program while it's being run. These can be allow you to analyse the code paths taken during a run.

Hope one or both of them can do the sort of things you're looking for.

share|improve this answer
    
Thank you for your prompt response. I'll start reading into these! –  Programster Oct 24 '12 at 21:48
    
This may also be of interest: stackoverflow.com/questions/1603980/best-php-qa-tools –  Spudley Oct 24 '12 at 22:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.