DEV Community

Andrei Dascalu
Andrei Dascalu

Posted on

For PHP devs - PHP Storm vs VSCode

Yes, I know how the title sounds and it's probably going to get some people riled up over other IDEs but there are some things worth mentioning:

  1. I'm a PHP dev but I appreciate and IDE that can help with other stuff reliably. Containers, GIT vizualization, diffs, some UI help and reliably working with other languages are definite pluses.

  2. I dislike Atom. It's nice for JS for the most part, but throw anything heavy at it and it slows to a crawl. Also, most plugins I worked with were buggy in mind blowing ways.

  3. I like SublimeText 3, but found it unreliable. Collecting PHP dependencies, particularly for 7, working with newer language features, doing stuff like finding interface implementations and so on aren't quite on par with others.

  4. VIM - yes, I used to like it. I'm old, I like stuff that just works (as much as possible) without getting sucked into customization and configuration. Give me 3 screens and a VIM configuration sprint and I'm there!

But on to the subject!

PHPStorm

I sort of think of it like a Holy Grail. Yes, it's a commercial product but if your outfit pays for it, it comes with great tooling.

  1. Diff tool:
    That's the feature I appreciate most about it. It's a clean 3-way merge + diff tool that makes it crystal clear where each change comes from and you can manually edit the outcome. When you're done, everything gets staged so that you can get on with the commit/merge/rebase

  2. Debugger:
    Pretty awesome XDebug integration. One thing I miss through was to easily control whether to automatically stop on exceptions. Otherwise the UI is pretty nice to on the fly evaluating and watching expressions, breakpoint control, etc - stuff you normally want from such a tool.

  3. GIT:
    Pretty basic integration. Nothing to write home about. It's there and you can do basic stuff in a basic UI.

  4. Refactoring:
    I always loved the way PHPStorm keeps up to date with language features. Formatting to standards, finding implementations of abstract functions / interfaces / etc, symbol replacement in project - all work flawlessly

  5. Bonuses:
    Sadly, nothing to write home about. You get some assistance on JS stuff, basic things like working with Dockerfiles but nothing beyond that. Need Python / Go or Kubernetes integration? Look elsewhere.

VSCode

Yes, it's Microsoft, but as far as tools go, it's right there at the top. Out of the box support for things like Python, JS/JSX/TypeScript is awesome for something free. Awesome enough to make me get over my Microsoft repulsion.

  1. Diff tool:
    that's one thing I miss. There are plugins but nothing really nice in the way of PHPStorm. My other favourite tool, Meld, isn't cross-platform so you may need to look for something appropriate

  2. Debugger:
    The XDebug plugin is awesome, somewhat better than PHPStorm IMHO. The UI might be as nice, but it doesn't get in the way. You have options to automatically break on various error levels, quick breakpoint navigation, quick expression evaluation & watch and exploring all in-scope variables.

  3. GIT:
    A few classes beyond what PHPStorm can do, the Git Lens plugin rivals most dedicated Git tools. I still prefer GitKraken for third-party integrations but barring those, I stick with Git Lens.

  4. Refactoring:
    Here it's worth mentioning that the built in PHP support in VSCode is second-class to Intelephense. However, Intelephense itself offers top-notch refactoring tools but for this like reliable symbol replacement and implementation discovery you need to shell out ... roughly 10 USD. Not a bad fee to get the core of what I appreciated about PHPStorm.

  5. Bonuses:
    Boy, where do I start.

  6. VSCode comes with top-of-the-class support for popular things like JS/JSX/React/Python/Golang in terms of languages

  7. Great integration for tools like PowerShell/Bash/Docker/Kubernetes - manage your containers/clusters straight from the IDE!

  8. one of my favourites is the TODO plugin that indexes all TODO comments from the code and can export them into lists / tasks /etc

  9. nice things like Bracket Colorizer add some spice to classic bracket matching by coloring bracket pairs with different colors

  10. font ligatures are awesome! Being able to turn key combinations like => into proper symbols is a nice icing on the cake

I am not entirely sure about VSCode licensing though, is it enterprise friendly?

Latest comments (5)

Collapse
 
dakujem profile image
Andrej Rypo

Ligatures in monospace font are funny. I mean, we could write code in Times too.

Collapse
 
andreidascalu profile image
Andrei Dascalu

Vscode does the same, via intelephense (not default php support) - just that refactoring names pace isn't a standalone action and it's not suggested as clearly.

Collapse
 
moopet profile image
Ben Sinclair

As far as licensing goes, VSCode is "freeware", and contains tracking blobs and so on. It's not something to rely on.

Its source is MIT-licensed, though, and there's a build of that called VSCodium, which is proper free software.

Given the choice between two products that are substantially the same, where one is free software and the other licensed, proprietary software, the choice is clear to me.

Collapse
 
glennmen profile image
Glenn Carremans

I love PHPStorm and have been using it for years now.

Some comments about the bonuses that you list for VSCode.
7) PHPStorm has native terminal support that you can fully customise, I use ZSH in phpstorm terminal
8) PHPStorm has had ToDo list (also combined from multiple files) for years now
9) Again PHPStorm also has Rainbow Brackets
10) PHPStorm also has support for font ligatures, they even recently released their own font Jetbrains Mono

I saw you mentioned that you used GitKraken, have you used Fork) yet? I recently switched to it and am loving it so far.

Collapse
 
andreidascalu profile image
Andrei Dascalu • Edited

Hmm, had no idea that phpstorm got ligatures support in the end. I guess my main point is that it doesn't seem to justify the pricing point anymore versus the versatility and features of several free options.

EDIT: I have tried Fork but was rather disappointed at the lack of integrations. Sure, I have to pay for that in GitKraken, but Fork doesn't have them (except for Github - use it only for personal projects and BitBucket), whereas Gitkraken works with the one I need most (self-hosted Gitlab).