Review unknown code with static analysis
summary
Static analysis inspects a 3,000‑file PHP codebase and produces concrete findings: 3,000 files, 5,000+ warnings from tools like PHPStan/Phan and tokenizer/AST queries, plus php -l linting. Results show a web app with templates, file uploads, GD, XML, MySQL/PDO and mPDF, extensive duplication (translation function defined ~32 times), heavy use of old PHP 5.x patterns (no namespaces, array() syntax), many $model variables, nested ternaries and compatibility issues for PHP7, and pinpointed file/line fixes ready for triage.
AI-written summary · about
chapters (21)
- 0:00Intro
- 1:14Review this code
- 2:09How to review code
- 4:00Source code is structured
- 16:43Application favorites
- 23:13Clean code for PHP
- 24:12Results by files Filename Overview
- 25:17Exakat : 350 analysis
- 28:49PHP 7.0 compatibility
- 29:51Automated code review
- 31:43Semantics and definitions
- 32:33AST diagram
- 33:35Flow Control Graph
- 34:17Data Dependency Graph
- 40:01PHP 7 helps static analysis
- 40:29PHP LINT - 7.0/1
- 42:23PHP LINT - 5.4/5/6 - 7.2
- 46:18What does this app do?
- 47:51Classes
- 51:16Variables
- 53:26Large application
related talks
53mStatic Analysis Saved My Code Tonight
47mStatic Code Analysis: Judging a Forest by Its Trees
50mPractical Advanced Static Analysis
25mTypes & static analysis are good in PHP
32mFrom Zero to Static Analysis Hero
44mPHP reviews for busy people
55mSquash Bugs with Static Analysis
51mDoes Your Code Measure Up?
