r/PHPhelp • • Sep 19 '22

PHP and VS Code

I decided to start using VS Code instead of Notepad++ and am trying to get the environment set up.

I know of Intellisense and Xdebug.

What other extensions do you recommend?

Any other tips?

10 Upvotes

12 comments sorted by

9

u/PickerPilgrim Sep 19 '22 edited Sep 19 '22
  • Intelephense (better than php-intellisense)

  • phpcs

  • phpcbf

Those are the big three VSCode plugins I rely on.

3

u/ardicli2000 Sep 19 '22

Php DocBlocker

10

u/itemluminouswadison Sep 19 '22

Phpstorm is the best php ide if you can swing it

7

u/gastrognom Sep 19 '22

I don't disagree, but if you're trying to be lightweight and have a multi-language IDE VSCode is pretty much perfect.

Here are a few extensions I use:

  • Intelephense

  • Remote Developement Package (if you're working with WSL / Docker)

  • PHP Debug (for xdebug support)

  • PHP Namespace Resolver

  • GitLens

  • GitLab Workflow (if you're using GitLab)

13

u/PickerPilgrim Sep 19 '22

PHP storm is great but OP asked about VSCode.

3

u/[deleted] Sep 19 '22

You don't read docs, do you?

3

u/gordonv Sep 19 '22

It is quite good. I find the "Ctrl B" function to jump to functions really handy.

While PHP Storm is focused on PHP, it handles HTML, CSS, and other common formats to web dev well.

You can try it free for 30 days. Check out some youtubes and udemy courses. If you're spending a lot of time in PHP, it's worth the look.

2

u/kAlvaro Sep 19 '22

I find the "Ctrl B" function to jump to functions really handy.

It's worth noting that, on paper, all editors/extensions typically offer the same exact features: syntax highlighting, code completion, go to definition... The key difference is how good the implementation is, something particularly hard to tell in advance, esp. with dynamic languages.

1

u/AntiqueSort582 Sep 19 '22

Annual Cost is $80 if I'm not wrong

1

u/jameswilson7208 Oct 04 '22

I'm paying $15/mo for the full JetBrains suite. Awesome deal.

1

u/DevDrJinx Sep 19 '22

MehediDracula.php-namespace-resolver
junstyle.php-cs-fixer