Closed sandrodz closed 7 years ago
Indeed, it's a convention on purpose. Uppercase are considered as global constants. It means foobar
become $foobar
and FOOBAR
just remains FOOBAR
in the compiled code.
You have several solutions:
1/ My recommendation is: follow one of the wide-followed convention for variable names: snake case (foo_bar) or camel case (fooBar) and use uppercase for constants (define('FOO_BAR', 'value')
). One uppercase char for a variable name is a bad idea: other developers that would maintain this code will never know what L
is about and they will not even expect this could be a variable. (In the same way, prefer current
over curr
).
2/ Use the mode 'auto'
or 'php'
('expressionLanguage' => 'auto'
) that can handle this syntax smoothly.
3/ Use the native pugjs engine ('pugjs' => true
)
1 option sounds good. thanks!