Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Select PHP MethodNew to Visual Studio Code? Get it now.
Select PHP Method

Select PHP Method

Alberto Bartsch

|
11 installs
| (1) | Free
Selects and copies entire PHP class methods, including PHPDoc comments, with a keyboard shortcut Ctrl+Alt+M. Ideal for PHP developers who need to manage code quickly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

'README.md'

Select PHP Method

Description

This extension for Visual Studio Code allows you to automatically select and copy entire PHP class methods, including PHPDoc comments, with a simple keyboard shortcut (Ctrl+Alt+M). It is ideal for PHP developers who need to quickly manage code and maintain consistency in their projects.

Features

  • Selects and copies complete PHP methods, including PHPDoc, access modifiers (public, private, protected), and the static modifier.
  • Uses the keyboard shortcut Ctrl+Alt+M (Cmd+Alt+M on Mac) to activate the functionality.
  • Compatible with methods with or without PHPDoc comments.

Requirements

  • Visual Studio Code version 1.97.0 or higher.
  • PHP files open in the editor.

Usage

  1. Open a PHP file in Visual Studio Code.
  2. Place the cursor inside a PHP method (it can be on any line, including the PHPDoc comment or the method body).
  3. Press Ctrl+Alt+M (or Cmd+Alt+M on Mac) to select and copy the entire method to the clipboard.

Installation

  • Install this extension from the Visual Studio Code Marketplace or from the generated .vsix file.
  • Once installed, it will be automatically active in PHP files.

Screenshots (Optional)

Here is an example of how Select PHP Method works:

Select PHP Method Demo

Contributions

If you want to contribute to the development of this extension, visit our GitHub repository: https://github.com/betoxx/select-php-method/.

License

This extension is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft