Skip to content

Benchmark ​

How long custos and other PHP tools take on real projects, and how much memory they need. The benchmark workflow refreshes these numbers every week, with the latest release of every tool and project.

Different tools, different jobs

Type checkers infer much more than custos, linters mostly check style, and fixers rewrite code. Compare times within a kind, and read finding counts only as a sign that a tool did its work: each counts what its own rules look for.

Measured on 2026-11-08 on linux/amd64, AMD EPYC 7763 64-Core Processor, 4 cores, 16 GB of memory, with PHP 8.4.27. Each time is the median of 3 runs.

guzzle ​

guzzle/guzzle at 8.3.1, 74 PHP files.

ToolKindVersionTimevs custosPeak memoryFindings
Mago analyzeanalyzer1.59.00.21 s0.3×211 MB584
custos analyseanalyzer0.1.10-3-ga032132c0.62 s1.0×98 MB48
Phananalyzer6.0.111.47 s2.4×223 MB281
PHPStananalyzer2.3.54.79 s7.7×313 MB50
Psalmanalyzer7.1.05.36 s8.7×448 MB172
Mago lintlinter1.59.00.10 s0.2×163 MB846
PHP_CodeSnifferlinter4.0.41.02 s1.7×96 MB720
custos fixfixer0.1.10-3-ga032132c0.56 s1.0×100 MB25
PHP-CS-Fixerfixer3.95.291.69 s3.0×157 MB0
Rectorfixer2.8.48.55 s15×498 MB26

composer ​

composer/composer at 2.11.1, 321 PHP files.

ToolKindVersionTimevs custosPeak memoryFindings
Mago analyzeanalyzer1.59.00.73 s0.2×231 MB5050
custos analyseanalyzer0.1.10-3-ga032132c3.40 s1.0×187 MB757
Phananalyzer6.0.115.71 s1.7×547 MB2238
PHPStananalyzer2.3.511.6 s3.4×820 MB242
Psalmanalyzer7.1.019.0 s5.6×1.1 GB1198
Mago lintlinter1.59.00.21 s0.06×189 MB4757
PHP_CodeSnifferlinter4.0.43.01 s0.9×105 MB10174
custos fixfixer0.1.10-3-ga032132c3.23 s1.0×201 MB511
PHP-CS-Fixerfixer3.95.296.80 s2.1×162 MB320
Rectorfixer2.8.414.2 s4.4×1.9 GB138

laravel ​

laravel/framework at v13.40.0, 1746 PHP files.

ToolKindVersionTimevs custosPeak memoryFindings
Mago analyzeanalyzer1.59.01.13 s0.1×392 MB21385
custos analyseanalyzer0.1.10-3-ga032132c8.29 s1.0×654 MB10997
Phananalyzer6.0.1120.0 s2.4×1.7 GB9102
PHPStananalyzer2.3.527.7 s3.3×1.6 GB3826
Psalmanalyzer7.1.069.6 s8.4×3.6 GB7040
Mago lintlinter1.59.00.31 s0.04×197 MB9047
PHP_CodeSnifferlinter4.0.48.61 s1.0×132 MB9854
custos fixfixer0.1.10-3-ga032132c8.47 s1.0×692 MB4617
PHP-CS-Fixerfixer3.95.2913.9 s1.6×180 MB446
Rectorfixer2.8.434.6 s4.1×3.5 GB1325

Features ​

What each tool offers besides speed. A tool that lacks a feature may still get it from a third-party plugin; the table lists what the tool itself provides.

FeaturecustosPHPStanPsalmPhanMagoPHP_CodeSnifferPHP-CS-FixerRector
Written inGoPHPPHPPHPRustPHPPHPPHP
Runs without PHP✓———✓———
Type checking— infers types for its rules✓✓✓✓ analyze———
Taint analysis✓ across files and into vendor/—✓ --taint-analysis—partial: superglobals echoed directly———
Automatic fixes✓ custos fixpartial: --fix, experimental✓ psalterpartial: --automatic-fix, few issues✓ --fix✓ phpcbf✓✓
Formatting————✓ fmt✓ phpcbf✓—
Language server✓ custos lsp—✓✓— planned———
MCP server for AI agents✓ custos mcp———————
Baseline✓✓✓✓✓———
Custom rules—✓✓✓✓✓ sniffs✓✓
SARIF output✓—✓—✓———

Checked against each tool's documentation on 2026-11-08; linked cells cite it.

Method ​

  • Every tool analyzes the project's source directories with its own configuration from bench/configs, after the project's dependencies are installed, so that analyzers can resolve vendor symbols.
  • Each run starts from an empty cache, after a warm-up run that fills the operating system's file cache. Tools use their default parallelism, or every core when they have to be told.
  • Peak memory sums the resident memory of the tool's processes, including its parallel workers.
  • Findings: problems reported by analyzers and linters, edits custos fix would apply, and files other fixers would change. Fixers run in dry-run mode.
  • vs custos divides a tool's time by the time of the custos command of the same kind (custos analyse, or custos fix for fixers).
  • Run it yourself with make compare; the tools, versions and projects are listed in bench/competitors.json.

Released under the MIT License. Native rules and rules modeled on Php Inspections (EA Extended); independent clean-room implementation.