Overview
Explore advanced static analysis techniques for PHP in this conference talk from PHP UK 2022. Learn about modern tools like PHPStorm, Psalm, Phan, and PHPStan that can detect a wide range of bugs while maintaining low false positive rates. Discover how to integrate these powerful tools into your development workflow and optimize your code for better static analysis results. Gain insights into the four stages of team development, compare static analysis with testing, and understand how these tools function. Dive into practical examples, learn about type declarations, array keys, and templates, and explore custom rules for refactoring. Enhance your ability to write more robust and maintainable PHP code by leveraging the full potential of advanced static analysis.
Syllabus
Intro
The 4 stages of a team
What is static analysis
Static analysis examples
Static analysis vs tests
How do these tools work
Running the tools
Bugs
Evolvability
Type declarations
Array keys
Templates
Summary
Baseline
Workflow
Refactoring
Static Analysis
Refactor Code
Custom Rules
Conclusion
Questions
Taught by
PHP UK Conference