Search code examples
phpstorm

PhpStorm adding unwanted tab after ?>


PhpStorm is adding an unwanted tab character below my first closing ?> tag. As you can see in the screenshot, the paragraph has a tab in front of it. I've searched through the code styles and can't seem to find where to change this.

This is bizarre because it does not happen if I have HTML above the first <?php tag.

Where do I turn this off so it doesn't get tabbed when I reformat the code?

enter image description here


Solution

  • It's a bug in IDE.

    https://youtrack.jetbrains.com/issue/WI-34740 -- try adding your code sample/comment there.


    Possible solution (not sure how acceptable that is, possibly not really):

    • add closing ?> tag
    • ensure that there is a blank empty line at the very end