PHP IntelliSense for Visual Studio Code
Español | English
A lightweight, powerful, feature-rich IDE extension for PHP, PHPX, and Laravel Blade templating in Visual Studio Code.
Key Features
1. Smart Autocompletion & IntelliSense (CompletionItemProvider)
- Native PHP functions, superglobals (
$_GET, $_POST, $_SESSION, etc.), and keywords.
- Workspace-wide autocompletion for custom functions, classes, interfaces, and traits.
2. Parameter Inlay Hints (InlayHintsProvider)
- Displays inline parameter names before function arguments (e.g.
formatCurrency(amount: 100, currencySymbol: '$')).
- Instantaneous performance with background symbol caching.
3. Real-Time Linting & Quick Fixes (Linter & CodeActionProvider)
- Real-time syntax checking via system native
php -l CLI + custom fallback rules.
- Highlights missing semicolons, omitted
<?php opening tags, and unbalanced brackets.
- Quick Fixes: Apply 1-click fixes for missing tags or semicolons.
4. Interactive Code Lenses & Execution (CodeLensProvider)
- Interactive buttons above PHP files and methods:
Ejecutar Archivo PHP: Executes the current script in the integrated VS Code terminal.
Depurar Archivo PHP: Launches a debug session.
- Hover over any class or function to view its complete PHPDoc documentation, parameter types, and return values formatted in Markdown.
6. Cross-File Navigation & Refactoring
- Go to Definition (
F12 / Ctrl+Click): Jump directly to function or class declarations across files.
- Find All References (
Shift+F12): Search for all usages of a symbol in the workspace.
- Rename Symbol (
F2): Safely rename functions or variables across all workspace files.
7. Automatic PHPDoc Generator (PHPDocProvider)
- Type
/** above any function and press Enter to automatically expand docblock templates with @param and @return annotations.
- Detects and displays the active system PHP version (e.g.
PHP 8.2.x) in the bottom-right status bar.
9. Extended Language Syntax Support
- Native syntax highlighting and bracket matching for
.php, .phpx (PHP with JSX components), and .blade.php (Laravel Blade templates).
File Extensions Supported
| Language |
Extension |
Syntax Support |
| PHP |
.php |
Full IntelliSense, Linting, Inlay Hints & Refactoring |
| PHPX |
.phpx |
Custom JSX component tags in PHP |
| Laravel Blade |
.blade.php |
Blade directives, injection & inline PHP |
Usage & Keyboard Shortcuts
| Action |
Shortcut |
Description |
| Go to Definition |
F12 / Ctrl+Click |
Jump to definition in workspace |
| Find References |
Shift+F12 |
Find all usages of a symbol |
| Rename Symbol |
F2 |
Rename symbol across project |
| Quick Fixes |
Ctrl+. |
Open fix suggestions |
| Generate PHPDoc |
Type /** + Enter |
Expand PHPDoc docblock snippet |
Requirements
- Visual Studio Code version
^1.107.0 or higher.
- (Optional)
php CLI installed in your system PATH for native php -l linting and running scripts.
Development & Building (yo code & @vscode/vsce)
1. Initial Scaffolding (yo code)
If you want to create or scaffold a new VS Code extension using Yeoman:
npm install -g yo generator-code
yo code
2. Development & Watching
To start development with hot reloading on changes:
npm run watch
3. Production Build & Packaging
To compile and package the extension into a .vsix installer file for distribution:
# Install VS Code Extension Manager globally
npm install -g @vscode/vsce
# Package extension into .vsix file
vsce package
Author
Created and maintained by Pirulug (GitHub).
License
MIT License.
| |