Referencing other, preceding php files?


I'm working with Bitrix and creating/editing site templates for the framework, among other stuff. These templates are often split into a `header.php` and a `footer.php`, where the framework will execute some other php code between the files (e.g. adding additional interface elements).

Since the webpage is split between two files, PhpStorm does not know about the html tags (like `div`, `span` etc.) that are opened in the first file and closed in the second, and thus notifies me about missing closing/opening tags. 

Is there any way to tell PhpStorm to reference the other file when interpreting these?

My goal is basically to remove the warning about missing opening/closing tags if a counterpart exists in the other file.

Bitrix' web editor shows both files in the same editor, with a tag so it knows how to separate the files. Sadly the web editor is obviously missing a lot of proper IDE features, so I'm using PhpStorm instead.

1 comment
Comment actions Permalink


Unfortunately, there is no way to "combine" different files to be inspected as one entity.

However, a similar feature request already exists on YouTrack:


Please feel free to vote & subscribe to get updates on this matter.


Please sign in to leave a comment.