Allow the use of PHP short open tags


I am using PhpSorm 2020.1.1.

Since a few versions, can't remember exactly how long ago, when I write Php code and start opening a tag, like <?, it gets automatically transformed into <?php.

In more than one project I work on the code uses the short tag syntax, so <? and <?=. I couldn't find a way to set this as a preference.

How can I do that?


Hi there,

Settings/Preferences  | Editor | General | Smart Keys | PHP | Auto-insert '<?php' tag after typing '<?'


I have this option turned on, but it's not working now.
I remember some time ago, I just clicked on some popup message about turn this off... And I think it was this switcher. But it's not.

So, the situation like this:
PhpStorm 2022.2.3, Build #PS-222.4345.15, built on October 5, 2022.
And I have this switcher "on".

After typing <? nothing happened. I press space and see mistake now:

Of corse I can press "Replace... " and it will be fixed. 
But I believe with that switcher it even couldn't happen.


So, I figure out it works, but not always.

At the beginning of script is ok, but inside of some html surrounding is not working.


@Dimas Frolov

Must be this one:


As a possible workaround: make a custom Live Template that will expand <?[SPACE] into <?php [CARET] ?> (use <? as an abbreviation and [SPACE] as an expand key; apply for HTML context only)