nikic/php-parser
Parse PHP code into an Abstract Syntax Tree (AST) for static analysis, manipulation, and code generation. Supports PHP 5.x to 8.4, handles errors gracefully, and preserves formatting during AST-to-code conversion. Easily traverse, modify, and convert ASTs back to PHP, with JSON serialization support...
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| phpunit/php-token-stream | 0.85 | phpunit/php-token-stream is a small PHP library for tokenizing and streaming PHP source code tokens, commonly used by PHPUnit and related tools for parsing, reflection-like inspection, and test-related code analysis. | 6,386 | 6,392 | 58 | 2M | 0 | 26.7 | 33.5 | NOASSERTION | — | |
| microsoft/tolerant-php-parser | 0.85 | Tolerant PHP parser from Microsoft that builds an AST even from incomplete or syntactically invalid code. Ideal for IDEs, refactoring tools, and static analysis, with error recovery and precise source positions for tokens and nodes. | 895 | 896 | 84 | 192K | 54 | 23.3 | 52.0 | MIT | — | |
| yooper/php-text-analysis | 0.84 | PHP Text Analysis provides Information Retrieval and NLP tools in PHP: tokenization, normalization, stemming, frequency and n-gram analysis, document comparison, sentiment and classification, collocations (PMI), lexical diversity, corpus analysis, and summarization. | 533 | 541 | 91 | 9K | 8 | 16.6 | 19.1 | MIT | 1 year ago | |
| goaop/dissect | 0.84 | — | 2 | 3 | 1 | 9K | 0 | 14.2 | 54.1 | MIT | 3 months ago | |
| sabberworm/php-css-parser | 0.83 | Parse and manipulate CSS in PHP with a fast, flexible parser. Convert CSS into an object model, inspect and edit rules, selectors, and declarations, then render back to CSS. Useful for minifying, rewriting assets, or building CSS tooling. | 1,825 | 1,834 | 152 | 7M | 134 | 59.6 | 82.5 | MIT | 1 month ago | |
| ircmaxell/php-c-parser | 0.83 | Parse C source files into an AST in PHP (PHP 8.4+), including preprocessing resolution. Use a Context to set #define values (ints, strings, identifiers) before parsing. Great for analysis tools, code inspection, and experimentation. | 44 | 44 | 7 | 140 | 4 | 17.4 | 10.9 | MIT | 2 months ago | |
| phpstan/phpdoc-parser | 0.82 | PHPDoc Parser for PHPStan that parses, represents, and modifies PHPDoc blocks as an AST. Supports rich type syntax (unions, generics, shapes, callables, conditional types), constant expressions, and Doctrine annotations, with full API reference for nodes. | 1,528 | 1,528 | 74 | 11M | 7 | 41.3 | 68.4 | MIT | 2 weeks ago | |
| khaled.alshamaa/ar-php | 0.79 | Ar-PHP is a PHP library for Arabic language processing: text shaping and normalization, transliteration, date/hijri handling, numbers-to-words, and other Arabic-specific utilities. Useful for Arabic web apps, reports, and localization. | 338 | 337 | 58 | 122K | 9 | 9.9 | 38.7 | LGPL-3.0 | 1 year ago | |
| imanghafoori/php-token-analyzer | 0.77 | Analyzes PHP code tokens without execution—like reflection but pure PHP. Framework-agnostic, lightweight dependency extracted from Laravel-Microscope. Supports PHP 7.4+ with automated tests for accuracy. Extract class/method details, token types, and structure effortlessly. Ideal for static analysis... | 16 | 16 | 4 | 7K | 0 | 0.6 | 36.1 | — | 4 years ago |
How can I help you explore Laravel packages today?