@@ -113,6 +113,7 @@ do { \
113
113
#define GET_DOUBLE_QUOTES_SCANNED_LENGTH () SCNG(scanned_string_len)
114
114
115
115
#define IS_LABEL_START (c ) (((c) >= ' a' && (c) <= ' z' ) || ((c) >= ' A' && (c) <= ' Z' ) || (c) == ' _' || (c) >= 0x80 )
116
+ #define IS_LABEL_SUCCESSOR (c ) (((c) >= ' a' && (c) <= ' z' ) || ((c) >= ' A' && (c) <= ' Z' ) || ((c) >= ' 0' && (c) <= ' 9' ) || (c) == ' _' || (c) >= 0x80 )
116
117
117
118
#define ZEND_IS_OCT (c ) ((c)>=' 0' && (c)<=' 7' )
118
119
#define ZEND_IS_HEX (c ) (((c)>=' 0' && (c)<=' 9' ) || ((c)>=' a' && (c)<=' f' ) || ((c)>=' A' && (c)<=' F' ))
@@ -2419,7 +2420,7 @@ skip_escape_conversion:
2419
2420
2420
2421
/* Check for ending label on the next line */
2421
2422
if (heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, heredoc_label->length)) {
2422
- if (!IS_LABEL_START (YYCURSOR[heredoc_label->length])) {
2423
+ if (!IS_LABEL_SUCCESSOR (YYCURSOR[heredoc_label->length])) {
2423
2424
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
2424
2425
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
2425
2426
}
@@ -2676,7 +2677,7 @@ double_quotes_scan_done:
2676
2677
2677
2678
/* Check for ending label on the next line */
2678
2679
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
2679
- if (IS_LABEL_START (YYCURSOR[heredoc_label->length])) {
2680
+ if (IS_LABEL_SUCCESSOR (YYCURSOR[heredoc_label->length])) {
2680
2681
continue;
2681
2682
}
2682
2683
@@ -2797,7 +2798,7 @@ heredoc_scan_done:
2797
2798
2798
2799
/* Check for ending label on the next line */
2799
2800
if (IS_LABEL_START(*YYCURSOR) && heredoc_label->length < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, heredoc_label->label, heredoc_label->length)) {
2800
- if (IS_LABEL_START (YYCURSOR[heredoc_label->length])) {
2801
+ if (IS_LABEL_SUCCESSOR (YYCURSOR[heredoc_label->length])) {
2801
2802
continue;
2802
2803
}
2803
2804
0 commit comments