Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PHP Type HintsNew to Visual Studio Code? Get it now.
PHP Type Hints

PHP Type Hints

Anton Vix

|
1 install
| (0) | Free
Display parameter names and return types as inlay hints for PHP
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Type Hints

Display parameter names and return types as inlay hints for PHP.

Features

  • Parameter Hints: Shows parameter names before arguments in function and method calls
  • Return Type Hints: Displays inferred return types for functions without explicit type declarations
  • Smart Detection: Automatically hides hints for named arguments (PHP 8.0+)
  • Configurable: Hide hints when variable names match parameter names
  • LSP-Powered: Leverages Language Server Protocol for accurate type information

Screenshot

alt text

Requirements

  • Intelephense extension must be installed and active

Configuration

{
    // Enable or disable all type hints
    "phpTypeHints.enabled": true,

    // Show parameter name hints for function calls
    "phpTypeHints.showParameterHints": true,

    // Show return type hints for function declarations
    "phpTypeHints.showReturnTypeHints": true,

    // Hide hint when variable name matches parameter name
    "phpTypeHints.hideWhenArgumentMatchesName": true,

    // Maximum file size to process (in bytes)
    "phpTypeHints.maxFileSize": 100000
}

Commands

  • PHP Type Hints: Toggle Hints - Quickly enable/disable all hints

Development

Install Dependencies

npm install

Compile

npm run compile

Run Tests

npm test

Create VSIX Package

npm run package

License

MIT License

Alternatives

  • PhpStorm Parameter Hints in VScode
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft