Extending the PHP Language
Learn how to implement new language features using static analysis.
11 talks, 11 articles, 1 video
Learn how to implement new language features using static analysis.
AI assisted coding needs deterministic guardrails. Turn every issue you find in generated code into a check the agent has to fix.
PHPStan increases code quality and reduces bugs. Learn how custom rules amplify these benefits.
Rector is best known for code upgrades, but it can do much more. Learn how to automate repetitive tasks and enforce standards with custom rules.
Type hints reduce bugs and enable safe refactoring, but PHP's type system has limits. Learn how static analysis bridges the gaps.
Static analysis can drastically reduce the bug count in your codebase. This talk gives practical advice on adding it to your development workflow.
Tips on how to use static analysis tools with legacy projects
Learn how to write code to get the most from static analysis tools, so you reduce the bug count on projects you're working on.
A hands-on workshop where you write your own custom Rector rules to automate refactoring across a PHP codebase.
Full-day workshop covering how to write custom rules for both PHPStan and Rector.
A hands-on workshop where you write your own custom PHPStan rules to enforce your PHP project's conventions automatically.
An experimental PHPStan extension: name behaviours like calling external services, track them through the call graph, and flag them where they're not allowed.
SARB lets you adopt static analysis on an existing PHP codebase: it baselines the issues you already have, so the build only fails on new ones.
Where appropriate should PHP updates start off in static analysis world before becoming part of the PHP language?
Learn how the InjectableVersion attribute ensures that correct interface of class is used in Dependency Injection.
Learn how the RestrictTraitTo attribute ensures that traits are used correctly.
Learn how the TestTag attribute helps with testing.
Learn how the NamespaceVisibility attribute emulates the missing package visibility modifier.
Learn how the MustUseResult attribute can prevent coding mistakes.
Learn how the Friend attribute can be used to enforce the usage of creational design patterns.
It's possible to use static analysis to emulate new language features in PHP. This article examines how, and introduces the PHP Language Extension Library.
This is the first part of a 4 part series of articles about adding PHPStan to existing projects. First we'll deal with team members who might object.
Why write a test for a single bug when you can write a rule that prevents that bug forever? We caught up with Ondřej Mirtes, the creator of PHPStan, to preview his upcoming talk at PHP UK Conference 2026.