Hashing is not necessary to generate unique variable names during compilation

This commit is contained in:
Jérôme Tamarelle
2021-12-13 20:18:05 +01:00
committed by Fabien Potencier
parent a41a6cce62
commit ba2b4e6dfe
3 changed files with 10 additions and 16 deletions
+1 -1
View File
@@ -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)