Typesafe PHP is a Visual Studio Code extension that enhances PHP development by improving type safety awareness, reducing runtime surprises, and helping developers write cleaner, more predictable PHP code.
It provides lightweight static analysis helpers, inline hints, and utilities designed to improve PHP code quality without requiring a full external linter setup.
✨ Features
🔍 Highlights potential type mismatches in PHP code
⚡ Generates boilerplate syntax through shortcut commands
🧠 Provides inline hints for unsafe or dynamic values
🧹 Detects unused variables in your codebase
⚡ Lightweight analysis with fast feedback inside VS Code
🧩 Works without requiring external PHP tooling (minimal setup)
🛠 Helps enforce safer coding patterns in dynamic PHP projects
More features will be added as the extension evolves.
📸 Example
✨ Shorthand syntax examples
// class
generates a class automatically
// fn
generates a function automatically
// if
generates a full if statement, same shortcut command for loops //while, foreach, do while
//enum
generates enum automatically
//try
generates a try block automatically