Closed Bilge closed 1 month ago
Variables names starting with a number are not supported. You won't be able to use such variables normally (i.e. without going through the special _context
variable), as their names are not valid identifiers.
So to me, that's a won't fix. But I'll let @fabpot give its opinion there.
It's also not an error. If it's not supported, it should be clear, instead of exhibiting weird behaviour.
Well, checking all array keys when passing variables to another template will have a performance impact.
but maybe some of these cases could be solved by replacing a few array_merge
with array_replace
in the codebase.
I've tried it today and it works well. I've also tried with very old versions of Twig and it works. So, I'm missing something here, but I don't know what.