Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Smart PHP SemicolonNew to Visual Studio Code? Get it now.
Smart PHP Semicolon

Smart PHP Semicolon

DALKREX

|
2 installs
| (0) | Free
Automatically adds PHP semicolons when pressing Enter, while avoiding common block/control lines.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Smart PHP Semicolon

Automatically adds semicolons to common PHP statements when you press Enter.

Features

  • Automatically adds ; to common PHP statements.
  • Keeps normal VS Code Enter behavior inside {} blocks.
  • Avoids duplicate semicolons.
  • Skips control structures such as if, else, foreach, while, and switch.
  • Supports common statements such as echo, return, throw, and function/method calls.
  • Works only in PHP files.

Example

Without a semicolon:

$name = "John"

Press Enter:

$name = "John";

Control structures are left unchanged:

if ($name == "John") {
    echo "Hello";
}

Settings

smartPhpSemicolon.enabled

Enable or disable automatic semicolon insertion.

Default:

true

smartPhpSemicolon.includeReturn

Choose whether return statements should automatically receive a semicolon.

Default:

true

Requirements

VS Code 1.85.0 or newer.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft