Generates a browsable representation of PHP code where sections with violations found by quality assurance tools such as PHP_CodeSniffer or PHPMD are highlighted.
PHP JavaScript CSS Smarty Batchfile
Pull request Compare This branch is 438 commits ahead of elger:master.
Latest commit b11fd2e Jan 9, 2017 @tacman tacman committed with fpletz Prefill counts with 0, not blank (#48)
Otherwise, PHP 7.1 complains



Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage SensioLabsInsight


|--> bin/           PHP_CodeBrowser scripts
|--> src/           Source files for PHP_CodeBrowser
|   |--> Plugins/   Plugins for different error handling/types
|--> templates/     Template files for PHP_CodeBrowser
|   |--> css/       Used CSS by templates, Color definition for errors
|   |--> img/       Used images for PHP_CodeBrowser
|   |--> js/        Used javascript for PHP_CodeBrowser
|--> tests/         PHPUnit test suite
|--> package.xml    PEAR package information file
|--> LICENCE        Licence information
|--> README         Structure and install information
|--> CHANGELOG      Update information


Git Checkout

$ git clone git://

Installation via Composer

Add this line to the require section in composer.json:

"mayflower/php-codebrowser": "~1.1"

Or to install it globally

composer global require "mayflower/php-codebrowser=~1.1"


see Releases


Shell Usage

Try ./bin/phpcb.php -h for usage information.

Integration in Jenkins, CruiseControl and Hudson

<!-- phpcb should be called after xml file generation -->
<target name="build" depends="...,phpcb" />
<target name="phpcb">
    <exec executable="phpcb">
        <arg line="--log path/to/log/dir
                   --output path/to/output/dir/
                   --source path/to/source/dir/" />

View the Results


Open /path/to/defined/output/index.html.



  <artifactspublisher dir="path/to/output" dest="artifacts/${}" subdirectory="PhpCbIdentifier" />


<cruisecontrol:tab name="PHP_CodeBrowser" label="PHP_CodeBrowser">
     <iframe src="<%=request.getContextPath() %>/<%= artifacts_url %>/PhpCbIdentifier/index.html" class="tab-content">


Have a look at the standard template for Jenkins jobs for PHP projects to see how PHP_CodeBrowser can be used together with Jenkins.

Contact Information

If you have any questions you may get in contact with: Elger Thiele or Thorsten Rinne