Skip to content

algo13/awesome-php-static-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Awesome static analysis for PHP

A curated list of static analysis tools for PHP.

Table of Contents

Standalone

Bugs finders

  • php -l - Syntax check only (lint)

    Windows:

    for /r . %%f in (*.php,*.inc,*.html) do php -l "%%f"

    Linux:

    $ find ./ -name "*.php" | xargs -n1 php -l
    • PHP Parallel Lint - This tool check syntax of PHP files faster than serial check with fancier output.
    • PHPLint - A tool that can speed up linting of php files by running several lint processes at once.
Name Run Target phar Depend Notes
Phan PHP7+
php-ast
YES nikic/php-ast
PHPStan PHP7+ PHP5.6+ NO nikic/php-parser
PHPMD PHP5.3+ YES pdepend/pdepend cleancode,codesize
controversial,design
naming,unusedcode
PHPSA PHP5.5+ PHP5.2+ YES nikic/php-parser
php-nag PHP5.4+ PHP5.2+ YES nikic/php-parser Deprecated functions,
Fall through, etc ...
Tuli PHP5.5+ NO ircmaxell/php-types Latest commit on 24 Oct 2015
magniffer NO nikic/php-parser Latest commit on 16 Dec 2015
PHPLinter NO Latest commit on 16 Aug 2012

Bugs finders(Specialized)

Name phar Depend Notes
PHPCPD YES Copy/Pasted Detector(CPD).
PHPDCD YES Dead Code Detector(DCD).
Pattern Detector NO halleck45/phpmetrics Design Pattern Detector.
PhpCodeAnalyzer NO Finds usage of non-built-in extensions.
PHP Assumption NO nikic/php-parser Finds weak assumptions.
PHP Unlocker NO nikic/php-parser Scan ADOdb code for unintended table locks.
twig-lint YES Standalone Twig linter.

Bugs finders(Security)

Name UI Depend Notes
phpvulhunter Browser nikic/php-parser Vulnerabilities
RIPS Browser Vulnerabilities
(OOP not supported)
psecio/parse CLI nikic/php-parser A PHP Security Scanner.
VisualCodeGrepper GUI Written in VisualBasic.
Eir CLI nikic/php-parser Written in C#.
PHP Reaper CLI nikic/php-parser Scan ADOdb code for SQL Injections.
TaintPHP CLI nikic/php-parser Static Taint Analysis.
Side Channel Analyzer CLI olivo/TaintPHP Search for Side-channel attack
phantm CLI Latest commit on 8 Oct 2012
Pixy CLI Latest commit on 20 Dec 2014

Coding standards

Compatibility

Name phar Depend Notes
PHPCompatibility squizlabs/PHP_CodeSniffer Required PHP_CodeSniffer.
PHPCodeFixer NO Deprecated functions, variables and ini directives.
PHP Migration YES nikic/php-parser PHP version migration and compatibility checking.
php7cc YES nikic/php-parser PHP7 Compatibility Checker.
php7mar NO PHP7 Migration Assistant Report.

Compatibility Fixers

Fixers

Metrics

API documentation generator

UML

Benchmark

Tools package

  • GrumPHP - Checks code on every commit.
  • Qafoo Quality Analyzer - Quality Analyzer is a tool to visualize metrics and source code.
  • PHPQA CLI - A tool for running QA tools(phploc, phpcpd, phpcs, pdepend, phpmd, phpmetrics).

DIY(Libraries)

Online

  • devbug - PHP Static Code Analysis.
  • 3v4l.org - run code in 150+ php & hhvm versions

SaaS

Misc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages