Skip to content

A lightweight PHP analyzer designed to catch silly mistakes PHP misses

Notifications You must be signed in to change notification settings

anttiryt/phplint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

phplint🚀

A lightweight PHP analyzer designed to catch silly mistakes PHP misses

Features

  • Syntax Validation: Runs a native php -l check 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, and foreach loops.

Missing

  • function and method name verification

Installation

No dependencies. No composer install. Just download the script and run it.

chmod a+x phplint
cp phplint ~/bin/

Usage

Run it from your terminal

phplint <target.php>

AI Collaboration

This project was built with the assistance of Gemini (Google AI). It’s a blend of human architectural intent and AI-generated logic heuristics.

License

MIT

About

A lightweight PHP analyzer designed to catch silly mistakes PHP misses

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages