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,455 | 60 | 1M | 0 | 13.4 | 23.1 | NOASSERTION | — | |
| 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 | 540 | 91 | 9K | 8 | 16.6 | 19.5 | MIT | 1 year ago | |
| microsoft/tolerant-php-parser | 0.84 | 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 | 83 | 195K | 54 | 23.3 | 52.1 | MIT | — | |
| 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,821 | 1,832 | 152 | 6M | 135 | 56.6 | 79.3 | MIT | 3 months 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 | 138 | 4 | 20.5 | 11.1 | MIT | 1 month ago | |
| jms/parser-lib | 0.83 | jms/parser-lib is a lightweight PHP parser library by JMS, providing reusable parsing components to build custom parsers quickly. Ideal for interpreting structured text and creating DSLs. Full docs available at jmsyst.com/libs/parser-lib. | 827 | 835 | 15 | 214K | 1 | 5.0 | 33.5 | Apache-2.0 | 4 years 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,526 | 74 | 10M | 8 | 35.0 | 65.0 | MIT | 4 months 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. | 333 | 334 | 58 | 116K | 9 | 9.8 | 38.5 | NOASSERTION | 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 | 3 | 7K | 0 | 0.5 | 36.2 | — | 4 years ago |
How can I help you explore Laravel packages today?