Libraries and building blocks

PHP Parser

A PHP parser written in PHP

When to use it

Developers building analyzers, refactoring tools, formatters, or source transformations

A mature AST, traversal API, and code builder underpin many PHP analysis and transformation tools.

Installation and compatibility

Type
Library
PHP
>=7.4
License
BSD-3-Clause
Install
composer require nikic/php-parser

Check the project documentation for configuration and version-specific requirements.

Strengths and limitations

ProProvides a mature PHP AST and traversal API.

ConIt produces syntax structures, not high-level findings.

Editorially reviewed

Repository activity

Activity: Active. Repository activity is a separate signal from suitability for your application.

Latest release
v5.9.0
Last commit
Last release

Metadata checked: .

Explore related tools

Browse all libraries and building blocks. Tools in the same category can serve different workflows; compare their requirements and limitations.