bug #3264 Optimize context access on PHP 7.4 (rob006)

This PR was merged into the 1.x branch.

Discussion
----------

Optimize context access on PHP 7.4

`700400` means PHP 70.4

refs https://github.com/twigphp/Twig/pull/2985

Commits
-------

e3c20d39 Fix optimize context access on PHP 7.4
This commit is contained in:
Fabien Potencier
2020-02-12 11:59:17 +01:00
+1 -1
View File
@@ -36,7 +36,7 @@ class NameExpression extends AbstractExpression
if ($this->getAttribute('is_defined_test')) {
if ($this->isSpecial()) {
$compiler->repr(true);
} elseif (\PHP_VERSION_ID >= 700400) {
} elseif (\PHP_VERSION_ID >= 70400) {
$compiler
->raw('array_key_exists(')
->string($name)