File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -694,6 +694,7 @@ final class Tokens
694694 T_ENDSWITCH => T_ENDSWITCH ,
695695 T_ENDWHILE => T_ENDWHILE ,
696696 T_ENUM => T_ENUM ,
697+ T_EVAL => T_EVAL ,
697698 T_EXIT => T_EXIT ,
698699 T_EXTENDS => T_EXTENDS ,
699700 T_FINAL => T_FINAL ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ class ContextSensitiveKeywords
2929 const /* testEndSwitch */ ENDSWITCH = 'ENDSWITCH ' ;
3030 const /* testEndWhile */ ENDWHILE = 'ENDWHILE ' ;
3131 const /* testEnum */ ENUM = 'ENUM ' ;
32+ const /* testEval */ EVAL = 'EVAL ' ;
3233 const /* testExit */ EXIT = 'EXIT ' ;
3334 const /* testExtends */ EXTENDS = 'EXTENDS ' ;
3435 const /* testFinal */ FINAL = 'FINAL ' ;
@@ -165,6 +166,8 @@ echo $foo;
165166print $ foo ;
166167/* testDieIsKeyword */
167168die ($ foo );
169+ /* testEvalIsKeyword */
170+ eval ('<?php echo 5; ' );
168171/* testExitIsKeyword */
169172exit ;
170173
@@ -212,3 +215,5 @@ $instantiated3 = new /* testClassInstantiationStaticIsKeyword */ static($param);
212215
213216class Foo extends /* testNamespaceInNameIsKeyword */ namespace \Exception
214217{}
218+
219+ function /* testKeywordAfterFunctionShouldBeString */ eval () {}
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ public function dataStrings()
7272 ['/* testEndSwitch */ ' ],
7373 ['/* testEndWhile */ ' ],
7474 ['/* testEnum */ ' ],
75+ ['/* testEval */ ' ],
7576 ['/* testExit */ ' ],
7677 ['/* testExtends */ ' ],
7778 ['/* testFinal */ ' ],
@@ -121,6 +122,8 @@ public function dataStrings()
121122 ['/* testNamespaceNameIsString1 */ ' ],
122123 ['/* testNamespaceNameIsString2 */ ' ],
123124 ['/* testNamespaceNameIsString3 */ ' ],
125+
126+ ['/* testKeywordAfterFunctionShouldBeString */ ' ],
124127 ];
125128
126129 }//end dataStrings()
@@ -376,6 +379,10 @@ public function dataKeywords()
376379 '/* testDieIsKeyword */ ' ,
377380 'T_EXIT ' ,
378381 ],
382+ [
383+ '/* testEvalIsKeyword */ ' ,
384+ 'T_EVAL ' ,
385+ ],
379386 [
380387 '/* testExitIsKeyword */ ' ,
381388 'T_EXIT ' ,
You can’t perform that action at this time.
0 commit comments