mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 01:46:37 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user