Download Latest Version Release 5.5.0 supporting PHP 7.0-8.4 syntax source code.tar.gz (1.9 MB)
Email in envelope

Get an email when there's a new version of Phan

Home / 5.5.0
Name Modified Size InfoDownloads / Week
Parent folder
phan.phar 2025-06-30 12.1 MB
phan.phar.asc 2025-06-30 143 Bytes
README.md 2025-06-30 3.6 kB
Release 5.5.0 supporting PHP 7.0-8.4 syntax source code.tar.gz 2025-06-30 1.9 MB
Release 5.5.0 supporting PHP 7.0-8.4 syntax source code.zip 2025-06-30 2.3 MB
Totals: 5 Items   16.3 MB 4

New features(Analysis):

  • Update real signatures of internal functions for PHP 8.1, add version for PHP 8.2, 8.3, and 8.4. #4960
  • Support dynamic class constant fetch in PHP >= 8.3. New issue type, PhanTypeInvalidConstantName, emitted when the dynamic constant name cannot be a string. #4963
  • Add basic support for deep-cloning of readonly properties in PHP >= 8.3. #4962
  • Warn when a subclass of a generic class does not use @extends or @inherit to substitute template types #4993 New issue type: PhanGenericMissingParameters
  • New plugin, AsymmetricVisibilityPlugin to analyze properties with asymmetric visibility when running in PHP 8.4. New issue types: PhanPluginAsymmetricVisibilityNoType, PhanPluginAsymmetricVisibilityLessRestrictive #4996

Bug fixes:

  • Fix type inference for properties with a PHPDoc type of static in assignments #4883
  • Fix type inference for json_decode returning objects vs associative arrays #4745
  • Fix infinite loop detection with calls to openssl_error_string, ob_get_level, and error_get_last #4971
  • Do not emit PhanPossiblyInfiniteRecursionSameParams if an array element or object property was modified #4972
  • Do not treat non-empty-string as a subtype of callable-string. Treat callable-array as a subtype of non-empty-array #4974
  • Properly infer template types when analyzing property assignments #4987
  • Fix edge cases when parsing generic types #4992
  • Do not infer all iterator key/value types from PHPDoc as real types #4986

Miscellaneous:

  • Update PHP >= 8.1 signatures of internal functions for resource to object migration #4960
  • Emit PhanTypeInvalidDimOffset when accessing a string offset of a union type containing string #4709
  • Mark imap_header() as removed in PHP 8.0
  • Infer key/element types more accurately for callable-array #4977
  • Infer parameter default type more accurately #4398

Plugins:

  • Fix PHPDocToRealTypesPlugin suggesting union types containing mixed as a non-standalone type #4952
  • Make PHPDocRedundantPlugin detect redundant @param annotations. This only warns if all the @param are redundant, and does not flag individual redundant parameters. #4955
  • Make UseReturnValuePlugin not require using the return value of similar_text when the &$percent argument is passed. #4979 #4981
Source: README.md, updated 2025-06-30