PHP support in Webstorm

I was given the impression that I could edit PHP files in Webstorm with limited features.  I have to edit some old PHP code and syntax highlighting is all I need.  But PHP is not in the list of languages and there is no plug-in.  How do I edit PHP in webstorm?

3
51 comments

I second Gerwyndaevidjones. I have had Webstorm for a few years now and just now need to edit PHP files. While it's rare for me, it's very annoying to have to use an external editor like Sublime just for one or two files. Can I also change my subscription to PHP storm? If there is no plans to add PHP to webstorm, maybe it should be discontinued and just market PHP storm and the IDE for web devs. 

0

Hi Carlin,

Could you please send us an email to sales@jetbrains.com with your license details included?

Thanks!

0

Hi Nikola,

 

I'm having the exact same issue. Is there a PHP extension available for WebStorm?

 

Thanks,

-Josiah

0

Hi Josiah,

There is no PHP extension available for WebStorm.

0

All we need is syntax highlighting! Come on!

0

WebStorm does support some very basic PHP highlighting. It's just not enabled for *.php files by default. To enable it:

  1. Open the Settings / Preferences dialog (e.g. Ctrl+Alt+S).
  2. In the left-hand pane, select Editor / File Types. (or find it in Settings)
  3. On the File Types page that opens in the right-hand part of the dialog, do the following:
    • Select PHP files (syntax highlighting only) under Recognized File Types
    • Click the Add button (+) in Registered Patterns
    • Type in *.php
  4. Enjoy
3

Yes, a basic syntax highlighting for PHP files is available in WebStorm via PHP Files (syntax highlighting only) file type. But it's indeed very basic - just some keywords/comments highlighting. You can edit this custom type definition, or try this one, for example: https://github.com/a2net/WebStorm-php-Syntax-Highlight-with-WordPress-functions.

0

It's so basic that almost no



 

0

I second this topic, there is no much highlight syntax support of PHP.

Bring more, please !

! have some php files in my web project and I need to edit them. I want to use Webstorm for simple editing.

0

Yep, quite a shame even in 2019. Do they really expect you to switch IDEs for editing some PHP file you may have in your project?! Wow...

0

this is the reason why I'm considering using Visual Code instead of webstorm: I don't understand the principles behind this separation PHP from Web (Javascript world mostly) made by JetBrains.

I still have some issues with VC and just waiting when they improve it (search dialog).

0

In 2019.2, WebStorm will provide PHP syntax highlighting via textmate bundles. See https://blog.jetbrains.com/webstorm/2019/05/webstorm-2019-2-eap/, Syntax highlighting for over 20 different languages section

0

Hello @Elena Pogorelova, today I need to edit some php files and I have been noticed that there are not syntax highlighting in my WebStorm 2021.1.

I think that something wrong in my settings, can you help me?

I have:

  • checkmark on `php` in `Editor/TextMate Bundles`
  • `*.php` pattern in `Editor/File Types` for `PHP (syntax highlighting only)`

Here is current highlighting for php file

0

Please could you share your preferences (File > Manage IDE Settings > Export settings) + idea.log (Help > Show Log in ...)?

0

Please remove *.php from the list of patterns assigned to PHP (syntax highlighting only) file type in Settings | Editor | File Types and re-open the project

0

Hi,
I'm using WebStorm for ~3 years. My main development is JS-Angular, but sometimes I also work with PHP. I don't want switch my WebStorm to PHPStorm, because I will not can back my subscription to WebStorm without interraption and creation new subscription.
I like how you did with Database tools, it available in PHPStorm, but also you did it as WebStorm paid plugin. If I will need database tools inside my IDE I just will add the plugin for some time. It's cool solution.
Please add all PHP support as paid plugin to WebStorm. It will be more universally and variably for the users. PHPStorm is WebStorm + PHP + Database in the end anyway. The users will can have one universal WEB IDE, and can get "PHPStorm" anytime, but they will can to decide that.
PHP is backend thing, but mostly time it's a part of the Web. I think universal IDE with name WebStorm better explains the area of the IDE and it also can include PHP. (or not, up to user).
Just a option: You can sell PHPStorm as a package of WebStorm+PHP+DB with same price as PHPStorm current price (with some discount if we compare with calculate separate prices) for don't do double work with PHP (ide and plugin). But actually you did it for Datagrip and DB plugin.
It will be comfortable, transparent and useful for users. One universal IDE for Web is WebStorm!
Thanks!

0

all i really want is a code suggestion, can we get it please?

0

No, sorry:( WebStorm doesn't include any PHP support except for very basic syntax highlighting provided through textmate bundles - no completion/types resolving/refactorings, no running/debugging, etc., and we have no plans to add it. If you need advanced PHP support, please consider switching to PHPStorm, it has all WebStorm stuff built-in

0

yeah, expected as such, already switched to phpstorm and turned off pretty much every php related thing possible for my regular projects.

0

Please sign in to leave a comment.