Note that there are some explanatory texts on larger screens.

plurals
  1. POEfficiently gathering information about the inner workings of a new PHP project. Tools? Techniques? Scripts?
    primarykey
    data
    text
    <p>I am soon to join a PHP project that has been developed over the course of several years. It's going to be huge, sparsely documented, many files, piles of code, no consitent quality level is to be expected.</p> <p>How would you go about gathering as much information as possible about what is going on?</p> <ul> <li><p>Autoloading is not be expected, at least not extensively, so <a href="http://www.php.net/manual/en/intro.inclued.php" rel="nofollow noreferrer">inclued</a> might do a good job revealing the interdependencies.</p></li> <li><p>Having <a href="http://www.phpdoc.org/" rel="nofollow noreferrer">phpDocumentor</a> digest the project files might give an idea about which classes/methods/functions are present.</p></li> <li><p>Maybe <a href="http://phpcallgraph.sourceforge.net/" rel="nofollow noreferrer">phpCallGraph</a> for method/function relations.</p></li> <li><p>Profiling some generic use cases with <a href="http://xdebug.org/docs/profiler" rel="nofollow noreferrer">XDebug</a> to gain an idea about the hierarchies and concepts.</p></li> <li><p>Inspecting important log-files ... checking out warnings, deprecated usages, errors.</p></li> <li><p><a href="http://de.php.net/manual/en/function.phpinfo.php" rel="nofollow noreferrer">phpinfo()</a>.</p></li> <li><p>Maybe extracting all comments and process them into a html-file.</p></li> </ul> <p>Didn't cover Unit-Tests, Databases, ....</p> <p>What would you do? What are your experiences with mentioned tools to get the most out of them?</p> <p>You can assume any condition necessary.</p> <p>What statistical information could be useful to extract?</p> <p>Has somebody experience with those tools?</p> <p><strong>EDIT</strong> from <a href="https://stackoverflow.com/questions/4202311/php-tools-for-quality-check">"PHP Tools for quality check"</a>:</p> <ul> <li><a href="http://phpmd.org/about.html" rel="nofollow noreferrer">PHP Mess Detector</a></li> <li><a href="https://github.com/sebastianbergmann/phpcpd/#readme" rel="nofollow noreferrer">Copy/Paste Detector (CPD) for PHP code by Seb. Bermann</a></li> </ul> <p><strong>EDIT 2</strong> from Bryan Waters' answer:</p> <ul> <li><p><a href="https://github.com/sebastianbergmann/phploc" rel="nofollow noreferrer">phploc - phploc is a tool for quickly measuring the size of a PHP project.</a></p></li> <li><p>Inspecting Apache logs and Google Analytics data to find out about the top requested URLs and then analyze what happens using XDebug profiling and a tool like <a href="http://kcachegrind.sourceforge.net/html/Home.html" rel="nofollow noreferrer">KCachegrind</a>.</p></li> <li><p>See his answer for concrete techniques.</p></li> </ul> <p><a href="https://stackoverflow.com/q/2180460/562440">Setting up a deployment / build / CI cycle for PHP projects - suggested by Pekka</a></p> <p><strong>EDIT 3</strong></p> <p>Just found this <a href="http://www.afup.org/templates/forumphp2010/resumes/443-Listen%20AFUP%202010.pdf" rel="nofollow noreferrer">PDF</a> of a talk by Gabriele Santini - "Statistical analysis of the code - Listen to your PHP code". This is like a gold mine.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload