nikic/PHP-Parser
A PHP parser written in PHP observed · 2026-08-28
Health v2 · maintenance only
96/100
- Activity 99
- Release rhythm 91
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 17
- age_days: 5616
- days_rel: 60
- days_push: 10
- n_releases_24m: 14
Adoption not part of the score
17456 stars · 1132 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A PHP parser written in PHP that converts PHP 5.x through 8.4 code into an abstract syntax tree (AST). It provides AST traversal, modification, pretty-printing back to code, name resolution, and constant expression evaluation for static analysis and code manipulation.
Use cases
- parse php code into an ast
- build a static analysis tool for php
- refactor php code programmatically
- generate php code from an ast
- detect deprecated php syntax in a codebase
- write a custom php linter
- transpile or transform php source code
When to choose
- you need to parse, analyze, or transform PHP source code in a PHP project
- you want accurate location information and error-tolerant parsing of invalid code
- you need to preserve formatting when modifying code
- you are building linters, codemods, or code generators for PHP
When to avoid
- you need to parse a language other than PHP
- you need a runtime interpreter or execution engine rather than a parser
- you need to parse PHP 4 or older code
Facets
library · maturity stable
parser static-site-generator developer-tools parsers programming-languages developer-tools php ast php-parser static-analysis code-generation code-manipulation
1 source
- readme: https://github.com/nikic/PHP-Parser · fetched 2026-08-28 · 0ebdd809dbfb
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| nikic/PHP-Parser | main | 96 |
For agents
markdown · JSON · MCP: product_card(name="nikic/PHP-Parser")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem