php-parser alternatives
8 packages that do the same job as php-parser: css-tree, @webassemblyjs/wasm-parser, chevrotain, esprima, @webassemblyjs/wast-parser, @bbob/parser, snapdragon, snapdragon-node. Figures below are from npm, GitHub and Bundlephobia.
| Package | Weekly downloads | 12-month change | Gzip | Dependencies | Last release | Module | Types | Runtimes |
|---|---|---|---|---|---|---|---|---|
| php-parser This package | 404.9k | +110% | - | 0 | 3 months ago | CommonJS | Bundled | - |
| css-tree | 88.1m | +116% | - | 2 | 6 months ago | ESM + CommonJS | None | - |
| @webassemblyjs/wasm-parser | 37m | +47% | - | 6 | 1 year ago | ESM + CommonJS | None | - |
| chevrotain | 7.1m | +198% | - | 5 | 1 month ago | ESM + CommonJS | Bundled | - |
| esprima | 85m | +40% | - | 0 | 8 years ago | CommonJS | None | - |
| @webassemblyjs/wast-parser | 4m | -18% | - | 6 | 1 year ago | ESM + CommonJS | None | - |
| @bbob/parser | 35.5k | - | - | 2 | 1 month ago | ESM + CommonJS | Bundled | - |
| snapdragon | 9.5m | -12% | - | 11 | 5 years ago | CommonJS | None | - |
| snapdragon-node | 9.2m | -9% | - | 0 | 7 years ago | CommonJS | None | - |
12-month change compares the average of the last 4 weeks of downloads with the first 4 weeks of the 52-week series. Gzip size is for the whole package (Bundlephobia). Runtimes are taken from each package's own documentation; "-" means not recorded.
A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations
Compared with php-parser
- 218x more weekly downloads (88.1m vs 404.9k)
- 2 dependencies vs 0
- ESM + CommonJS vs CommonJS
- No types vs bundled types
- Declares Node.js ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0 vs none declared
- Last release 5 Mar 2026 vs 10 Jun 2026
- 3.8x more GitHub stars (2.1k vs 565)
WebAssembly binary format parser
Compared with php-parser
- 91x more weekly downloads (37m vs 404.9k)
- 6 dependencies vs 0
- ESM + CommonJS vs CommonJS
- No types vs bundled types
- Last release 6 Nov 2024 vs 10 Jun 2026
- 1.5x more GitHub stars (836 vs 565)
Chevrotain is a high performance fault tolerant javascript parsing DSL for building recursive decent parsers
Compared with php-parser
- 17x more weekly downloads (7.1m vs 404.9k)
- 5 dependencies vs 0
- ESM + CommonJS vs CommonJS
- Declares Node.js >=22.0.0 vs none declared
- Last release 1 Aug 2026 vs 10 Jun 2026
- 5.0x more GitHub stars (2.8k vs 565)
ECMAScript parsing infrastructure for multipurpose analysis
Compared with php-parser
- 210x more weekly downloads (85m vs 404.9k)
- No types vs bundled types
- Declares Node.js >=4 vs none declared
- Last release 13 Jul 2018 vs 10 Jun 2026
- 13x more GitHub stars (7.1k vs 565)
WebAssembly text format parser
Compared with php-parser
- 9.9x more weekly downloads (4m vs 404.9k)
- 6 dependencies vs 0
- ESM + CommonJS vs CommonJS
- No types vs bundled types
- Last release 6 Nov 2024 vs 10 Jun 2026
- 1.5x more GitHub stars (836 vs 565)
A BBCode to AST Parser part of @bbob
Compared with php-parser
- 11x fewer weekly downloads (35.5k vs 404.9k)
- 2 dependencies vs 0
- ESM + CommonJS vs CommonJS
- Last release 27 Jul 2026 vs 10 Jun 2026
- 2.8x fewer GitHub stars (200 vs 565)
Easy-to-use plugin system for creating powerful, fast and versatile parsers and compilers, with built-in source-map support.
Compared with php-parser
- 23x more weekly downloads (9.5m vs 404.9k)
- 11 dependencies vs 0
- No types vs bundled types
- Declares Node.js >=0.10.0 vs none declared
- Last release 9 Apr 2021 vs 10 Jun 2026
- 2.5x fewer GitHub stars (224 vs 565)
Class for creating AST nodes.
Compared with php-parser
- 23x more weekly downloads (9.2m vs 404.9k)
- No types vs bundled types
- Declares Node.js >=4 vs none declared
- Last release 24 Nov 2018 vs 10 Jun 2026
- 20x fewer GitHub stars (28 vs 565)
Indexability: Indexed.