LanguagesPHP
phpperf
PHP performance notes, small examples, and phpperf-lint.
Part of XPerf. Shared docs: docs/README.md. Heuristic lint (corpus-ready: yes; ph-array-merge-rebind=error with G4; ph-string-dot-hot=off; ph-echo-hot=hint). Guide v0.
Contents
- English guide (v0) — from
docs/guide-src/ phpperf-lint— ph-string-dot-hot–ph-echo-hot- Corpus pins
Focus
Avoid quadratic string growth (.=), prefer push over array_merge rebinding, gate hot echo/print.
Run lint
cd packages/phpperf
php phpperf-lint/phpperf-lint.php path/to/sources
bash scripts/smoke-lint.sh
bash scripts/self-lint.shExit 1 only for error-severity findings (hints exit 0 unless --strict-hints).
Layout
docs/guide-src/ chapter sources
docs/ assembled guide + corpus.md + evidence-policy.md
evidence/ ph-array-merge-rebind measured (error); ph-string-dot-hot measured (off); ph-echo-hot measured (hint)
examples/ tiny demos
phpperf-lint/ checker + fixtures
scripts/ smoke-lint.sh, self-lint.sh