The Phan 2.x releases support analysis of php 7.0-7.3, and can be executed with php 7.1+.
New features(Analysis):
-
Support analysis of PHP 7.4's short arrow function syntax (
fn ($arg) => expr) (#2714)
(requires php-ast 1.0.2dev or newer)Note that the polyfill does not yet support this syntax.
-
Infer the return types of PHP 7.4's magic methods
__serialize()and__unserialize(). (#2755)
Improve analysis of return types of other magic methods such as__sleep(). -
Support more of PHP 7.4's function signatures (e.g.
WeakReference) (#2756) -
Improve detection of unused variables inside of loops/branches.
Plugins:
- Detect some new php 7.3 functions (
array_key_first, etc.) inUseReturnValuePlugin. - Don't emit a
PhanNativePHPSyntaxCheckPluginerror inInvokePHPNativeSyntaxCheckPlugindue to a shebang beforedeclare(strict_types=1) - Fix edge cases running
PhanNativePHPSyntaxCheckPluginon Windows (in language server/daemon mode)
Bug fixes: