What do you call variables that have double curly braces in laravel

让人想犯罪 __ 提交于 2019-12-11 08:01:52

问题


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.


回答1:


I call them "blade template variables."




回答2:


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.



来源:https://stackoverflow.com/questions/27675853/what-do-you-call-variables-that-have-double-curly-braces-in-laravel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!