Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>PHP Formatter - Format PHP codeNew to Visual Studio Code? Get it now.
PHP Formatter - Format PHP code

PHP Formatter - Format PHP code

clclw

|
52 installs
| (0) | Free
A wrapper for the Sensiolabs PHP CS Fixer. Analyzes some PHP source code and tries to fix coding standards issues (PSR-1 and PSR-2 compatible).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PHP Formatter

After installing as an extension with Visual Studio Code, this extension automatically formats your PHP code, in accordance with PSR-0, PSR-1, PSR-2 or Symfony style conventions...

Features

  • Format current selection only, or the whole file.
  • Trigger formatting with custom keybindings or actions.
  • Supports formatting on save.
  • Supports adjustable level (i.e. PSR2) and fixers.
  • Can be configured to support other file extensions than PHP as well, i.e. ".inc" files.
  • Supports different PHP-CS-Fixer installation methods, i.e. Composer vs manual installation.

Setup

Refer to our wiki for a quick and easy guide on how to install the extension and its dependencies.

Configuration

Want custom keybindings? Need specific levels and fixers? Check out the wiki

Troubleshooting

Set up the extension, but can't get it to work? Check the Troubleshooting section.

Contribute

Want to add a feature or fix an error? Follow the Contribute section on the wiki to get started.

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