Skip to content
JS
Alternatives

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.

Data as of 25 Sept 2026
PackageWeekly downloads12-month changeGzipDependenciesLast releaseModuleTypesRuntimes
php-parser
This package
404.9k+110%-03 months agoCommonJSBundled-
css-tree88.1m+116%-26 months agoESM + CommonJSNone-
@webassemblyjs/wasm-parser37m+47%-61 year agoESM + CommonJSNone-
chevrotain7.1m+198%-51 month agoESM + CommonJSBundled-
esprima85m+40%-08 years agoCommonJSNone-
@webassemblyjs/wast-parser4m-18%-61 year agoESM + CommonJSNone-
@bbob/parser35.5k--21 month agoESM + CommonJSBundled-
snapdragon9.5m-12%-115 years agoCommonJSNone-
snapdragon-node9.2m-9%-07 years agoCommonJSNone-

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)
Sources: npm registry, npm downloads API, GitHub API, Bundlephobia. Data fetched 25 Sept 2026.

Indexability: Indexed.