PHP-Parser

PHP-Parser is a library that converts PHP 7 and 8 codes into abstract syntax trees (AST). It is designed to facilitate static code analysis and code manipulation processes. It supports the creation, replacement and re-transformation of the AST structure into the PHP code.

PH

nikic · Code Quality & Review

STARS17.5K
FORKS1.1K
COMMITS1.8K
CONTRIBUTORS139
VERSIONv5.8.0
UPDATED3 days ago
PHPStatic AnalysisASTKod AyrıştırmaBSD-3-Clause

Common commercial products in this category: SonarCloud, Codacy, DeepSource

What can it do?
  • You can convert PHP codes into abstract syntax tree structure by parsing them.
  • By browsing the code, you can change or delete certain nodes.
  • You can convert the tree structures you created or changed back to PHP code.
User reviews
  • • NeutralHacker News

    PHP-Parser: A Native PHP Parser for Parsing and Analyzing PHP Code

    “It's certainly used on its own codebase indirectly, phpstan - the static analysis tool they use - uses PHP-Parser internally:”

  • • NeutralHacker News

    PHP-Parser: A Native PHP Parser for Parsing and Analyzing PHP Code

    “12 years later, PHP-Parser is an important part of the PHP ecosystem, particularly in code analysis and refactoring tools.”

GitHub

My note

Alternative pages

More in: Code Quality & Review