Skip to content

Commit 76b1469

Browse files
committed
Update USE_* flags for PHP 7.2
These now use ZEND_SYMBOL_*.
1 parent 81e2938 commit 76b1469

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ast.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,9 +834,15 @@ PHP_MINIT_FUNCTION(ast) {
834834
ast_register_flag_constant("EXEC_REQUIRE", ZEND_REQUIRE);
835835
ast_register_flag_constant("EXEC_REQUIRE_ONCE", ZEND_REQUIRE_ONCE);
836836

837+
#if PHP_VERSION_ID >= 70200
838+
ast_register_flag_constant("USE_NORMAL", ZEND_SYMBOL_CLASS);
839+
ast_register_flag_constant("USE_FUNCTION", ZEND_SYMBOL_FUNCTION);
840+
ast_register_flag_constant("USE_CONST", ZEND_SYMBOL_CONST);
841+
#else
837842
ast_register_flag_constant("USE_NORMAL", T_CLASS);
838843
ast_register_flag_constant("USE_FUNCTION", T_FUNCTION);
839844
ast_register_flag_constant("USE_CONST", T_CONST);
845+
#endif
840846

841847
ast_register_flag_constant("MAGIC_LINE", T_LINE);
842848
ast_register_flag_constant("MAGIC_FILE", T_FILE);

0 commit comments

Comments
 (0)