mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 03:57:21 +00:00
Hashing is not necessary to generate unique variable names during compilation
This commit is contained in:
committed by
Fabien Potencier
parent
a41a6cce62
commit
ba2b4e6dfe
+1
-1
@@ -56,7 +56,7 @@ class Parser
|
||||
|
||||
public function getVarName()
|
||||
{
|
||||
return sprintf('__internal_%s', hash('sha256', __METHOD__.$this->stream->getSourceContext()->getCode().$this->varNameSalt++));
|
||||
return sprintf('__internal_parse_%d', $this->varNameSalt++);
|
||||
}
|
||||
|
||||
public function parse(TokenStream $stream, $test = null, $dropNeedle = false)
|
||||
|
||||
Reference in New Issue
Block a user