A lightweight PHP analyzer designed to catch silly mistakes PHP misses
- Syntax Validation: Runs a native
php -lcheck first. - Initialization Tracking: Detects variables used before they are defined within their scope.
- Typo Detection: Uses Levenshtein distance to suggest the correct variable name when a typo is detected.
- Scope Awareness: Understands global vs. function scopes, including
isset,empty, andforeachloops.
- function and method name verification
No dependencies. No composer install. Just download the script and run it.
chmod a+x phplint
cp phplint ~/bin/
Run it from your terminal
phplint <target.php>
This project was built with the assistance of Gemini (Google AI). It’s a blend of human architectural intent and AI-generated logic heuristics.
MIT