File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 224224
225225* 1.40.2 (2019-XX-XX)
226226
227- * n/a
227+ * optimized context access on PHP 7.4
228228
229229* 1.40.1 (2019-04-29)
230230
Original file line number Diff line number Diff line change @@ -36,13 +36,20 @@ public function compile(Compiler $compiler)
3636 if ($ this ->getAttribute ('is_defined_test ' )) {
3737 if ($ this ->isSpecial ()) {
3838 $ compiler ->repr (true );
39+ } elseif (\PHP_VERSION_ID >= 700400 ) {
40+ $ compiler
41+ ->raw ('array_key_exists( ' )
42+ ->string ($ name )
43+ ->raw (', $context) ' )
44+ ;
3945 } else {
4046 $ compiler
4147 ->raw ('(isset($context[ ' )
4248 ->string ($ name )
4349 ->raw (']) || array_key_exists( ' )
4450 ->string ($ name )
45- ->raw (', $context)) ' );
51+ ->raw (', $context)) ' )
52+ ;
4653 }
4754 } elseif ($ this ->isSpecial ()) {
4855 $ compiler ->raw ($ this ->specialVars [$ name ]);
You can’t perform that action at this time.
0 commit comments