PHP Parser
A PHP parser written in PHP (by nikic)
PHP CS Fixer
A tool to automatically fix PHP Coding Standards issues (by PHP-CS-Fixer)
| PHP Parser | PHP CS Fixer | |
|---|---|---|
| 16 | 43 | |
| 17,393 | 13,400 | |
| 0.2% | 0.2% | |
| 7.9 | 9.9 | |
| 17 days ago | 4 days ago | |
| PHP | PHP | |
| BSD 3-clause "New" or "Revised" License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PHP Parser
Posts with mentions or reviews of PHP Parser. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-11-21.
- PHP 8.4 Released
Once rector gets 8.4 rules out, this will be pretty awesome:
https://github.com/rectorphp/rector/issues/8701
https://github.com/nikic/PHP-Parser/commit/7b0384cdbe03431c4...
- Showcasing PHP-Parser: A Native PHP Parser Written in PHP
- PHP Is the Best Choice for Long‑Term Business
- PHP-Parser: A Native PHP Parser for Parsing and Analyzing PHP Code
heh, I'll be straight that I'm sad it doesn't parse its own source in the tests ... or maybe it does <https://github.com/nikic/PHP-Parser/blob/v5.1.0/test/bootstr...>, who knows (joking but not joking)
- PHP-Parser: A PHP parser written in PHP
- Diff Speeding - Rector and sebastian/diff speed improvements through profiling
Interesting. One of the reasons I stopped considering Rector is because of how memory, CPU, and time intensive it is for a non-trivial project. Instead I've been using Nikita's PHP Parser directly and getting much better results even though it isn't multi-threaded out of the box.
- PHP Skeleton for Bison
nikic/PHP-Parser uses a Bison equivalent for PHP parsing. See the grammar file https://github.com/nikic/PHP-Parser/blob/4.x/grammar/php7.y.
- Alternative for nette/tokenizer?
Maybe nikic/PHP-Parser is an alternative. If you only need to tokenizer part, PHP has an extension too.
- How PHP engine builds AST
nikic/PHP-Parser
- Parsing with PHP, Bison and re2c
Code parsing. Many linters and code builders use php-parser. It uses YACC (analog Bison) to build AST.
PHP CS Fixer
Posts with mentions or reviews of PHP CS Fixer. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-27.
- Formatting PHP Code with PHP CS Fixer
One of the tools you can use for formatting your PHP code is PHP CS Fixer. It's an incredibly popular tool and, at the time of writing, has over 214 million downloads on Packagist.
- Automate Your PHP Code Formatting with PHP-CS-Fixer
- 8 Essential Tools Every PHP Developer Needs
PHP-CS-Fixer automatically fixes PHP coding standard issues, maintaining a clean codebase and adhering to coding standards. It can be integrated into the development workflow to ensure all code complies with defined standards.
- Avoiding empty() in PHP
friendsofphp/php-cs-fixer
- PHP-CS-Fixer doesn't fix a lot of things?
- Laravel measuring system?
- PHP in 2023 - stitcher.io
While you're at it, also include code-style checkers like phpcs, phpmd and/or php-cs-fixer
- Write a PHP library supports PHP 5.6 to 8.1
I run two tools for this - php-cs-fixer on PHP 5.6 and the built-in syntax checker(php -l).
- Featherweight library to write to slack channel
You can use this library to help automate this: https://github.com/FriendsOfPHP/PHP-CS-Fixer 😊
- How I was able to install php-cs-fixer. Vscode + Linux machine
To be bit a elaborate and for a proper updated installtion process, here is what I did: I used the [latest versio]n(https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/tag/v3.10.0) of php cs fixer then entered the command that followed to install php-cs-fixer.
What are some alternatives?
When comparing PHP Parser and PHP CS Fixer you can also consider the following projects:
PHP Analyser - Performs advanced static analysis on PHP code
PHP Code Sniffer - PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
PHP Semantic Versioning Checker - Compares two source sets and determines the appropriate semantic versioning to apply.
PHPStan - PHP Static Analysis Tool - discover bugs in your code without running it!
PHPCPD - Copy/Paste Detector (CPD) for PHP code.
GrumPHP - A PHP code-quality tool