IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Language injections

Last modified: 08 March 2021

Language injections let you work with pieces of code in other languages embedded in your code. When you inject a language (such as HTML, CSS, XML, RegExp, and so on) into a string literal, you get comprehensive code assistance for editing that literal.

In the PHP context, you can use the special PHP dialect called Injectable PHP. This dialect is similar to PHP, with the exception for the <?php opening tag, which can be omitted. Injectable PHP can be injected into string literals manually, just as any other language. In addition, it is automatically injected into eval() calls and in Markdown fenced code blocks with the language identifier set to php.