1

I'm trying to find out a name for code that is surrounded by double curly braces in Laravel.

Do they even have a name. Are they known as double curly braces in all languages.

The reason I want to know is that I still do not quite understand the scope of them. I know a lot of languages use them, but what is their name?

For instance; if I want to know why double curly brace variables don't work in a Laravel @include; how do I find out?

Another example is that I cannot add a tag on stack exchange for double-curly-braces because it does not exist.

Searching Google brings up nothing. Searching stack exchange is the same.

warmwhisky
  • 409
  • 1
  • 10
  • 22
  • In the source they are simply called `echos`. Because that's what they become once they are compiled. `{{ $foo }}` compiles to `` – lukasgeiter Dec 28 '14 at 11:17

2 Answers2

2

I call them "blade template variables."

Ben Harold
  • 6,242
  • 6
  • 47
  • 71
0

Behind the scene of {{ $foo }} is <?php echo e($foo); ?>. I accidentally found out when I'm searching a particular variable in my project using PhpStorm and it shows me the compiled view files of Laravel w/c resides in storage/framework/views.

Jake Pucan
  • 628
  • 8
  • 11