diff --git a/Zend/tests/warning_during_heredoc_scan_ahead.phpt b/Zend/tests/warning_during_heredoc_scan_ahead.phpt
new file mode 100644
index 00000000000..099d1c087ff
--- /dev/null
+++ b/Zend/tests/warning_during_heredoc_scan_ahead.phpt
@@ -0,0 +1,20 @@
+--TEST--
+No warnings should be thrown during heredoc scan-ahead
+--FILE--
+<?php
+
+<<<TEST
+${x}
+\400
+${/*}
+TEST;
+
+?>
+--EXPECTF--
+Warning: Unexpected character in input:  '' (ASCII=1) state=0 in %s on line %d
+
+Warning: Octal escape sequence overflow \400 is greater than \377 in %s on line %d
+
+Warning: Unterminated comment starting line %d in %s on line %d
+
+Parse error: syntax error, unexpected end of file in %s on line %d
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 39b02f0e428..cc1a938c13b 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 1.1.1 */
+/* Generated by re2c 1.0.1 */
 #line 1 "Zend/zend_language_scanner.l"
 /*
    +----------------------------------------------------------------------+
@@ -1460,10 +1460,12 @@ yy3:
 		RETURN_TOKEN(END);
 	}
 
-	zend_error(E_COMPILE_WARNING,"Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	if (!SCNG(heredoc_scan_ahead)) {
+		zend_error(E_COMPILE_WARNING, "Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	}
 	goto restart;
 }
-#line 1467 "Zend/zend_language_scanner.c"
+#line 1469 "Zend/zend_language_scanner.c"
 yy5:
 		YYDEBUG(5, *YYCURSOR);
 		++YYCURSOR;
@@ -1479,7 +1481,7 @@ yy5:
 		{
 	goto return_whitespace;
 }
-#line 1483 "Zend/zend_language_scanner.c"
+#line 1485 "Zend/zend_language_scanner.c"
 yy8:
 		YYDEBUG(8, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -1491,7 +1493,7 @@ yy9:
 		{
 	RETURN_TOKEN(yytext[0]);
 }
-#line 1495 "Zend/zend_language_scanner.c"
+#line 1497 "Zend/zend_language_scanner.c"
 yy10:
 		YYDEBUG(10, *YYCURSOR);
 		++YYCURSOR;
@@ -1542,7 +1544,7 @@ yy10:
 	BEGIN(ST_DOUBLE_QUOTES);
 	RETURN_TOKEN('"');
 }
-#line 1546 "Zend/zend_language_scanner.c"
+#line 1548 "Zend/zend_language_scanner.c"
 yy12:
 		YYDEBUG(12, *YYCURSOR);
 		++YYCURSOR;
@@ -1580,7 +1582,7 @@ yy12:
 	}
 	RETURN_TOKEN(T_COMMENT);
 }
-#line 1584 "Zend/zend_language_scanner.c"
+#line 1586 "Zend/zend_language_scanner.c"
 yy14:
 		YYDEBUG(14, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -1700,7 +1702,7 @@ skip_escape_conversion:
 	}
 	RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING);
 }
-#line 1704 "Zend/zend_language_scanner.c"
+#line 1706 "Zend/zend_language_scanner.c"
 yy19:
 		YYDEBUG(19, *YYCURSOR);
 		yyaccept = 0;
@@ -1876,7 +1878,7 @@ yy27:
 	ZEND_ASSERT(!errno);
 	RETURN_TOKEN_WITH_VAL(T_LNUMBER);
 }
-#line 1880 "Zend/zend_language_scanner.c"
+#line 1882 "Zend/zend_language_scanner.c"
 yy28:
 		YYDEBUG(28, *YYCURSOR);
 		yyaccept = 1;
@@ -1962,7 +1964,7 @@ yy36:
 		{
 	RETURN_TOKEN_WITH_STR(T_STRING, 0);
 }
-#line 1966 "Zend/zend_language_scanner.c"
+#line 1968 "Zend/zend_language_scanner.c"
 yy37:
 		YYDEBUG(37, *YYCURSOR);
 		yyaccept = 2;
@@ -2251,7 +2253,7 @@ yy58:
 		{
 	RETURN_TOKEN(T_NS_SEPARATOR);
 }
-#line 2255 "Zend/zend_language_scanner.c"
+#line 2257 "Zend/zend_language_scanner.c"
 yy60:
 		YYDEBUG(60, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2272,7 +2274,7 @@ yy62:
 	BEGIN(ST_BACKQUOTE);
 	RETURN_TOKEN('`');
 }
-#line 2276 "Zend/zend_language_scanner.c"
+#line 2278 "Zend/zend_language_scanner.c"
 yy64:
 		YYDEBUG(64, *YYCURSOR);
 		++YYCURSOR;
@@ -2283,7 +2285,7 @@ yy64:
 	yy_push_state(ST_IN_SCRIPTING);
 	RETURN_TOKEN('{');
 }
-#line 2287 "Zend/zend_language_scanner.c"
+#line 2289 "Zend/zend_language_scanner.c"
 yy66:
 		YYDEBUG(66, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2303,7 +2305,7 @@ yy67:
 	}
 	RETURN_TOKEN('}');
 }
-#line 2307 "Zend/zend_language_scanner.c"
+#line 2309 "Zend/zend_language_scanner.c"
 yy69:
 		YYDEBUG(69, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2315,7 +2317,7 @@ yy70:
 		{
 	RETURN_TOKEN(T_IS_NOT_EQUAL);
 }
-#line 2319 "Zend/zend_language_scanner.c"
+#line 2321 "Zend/zend_language_scanner.c"
 yy71:
 		YYDEBUG(71, *YYCURSOR);
 		++YYCURSOR;
@@ -2344,7 +2346,7 @@ yy73:
 		{
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 2348 "Zend/zend_language_scanner.c"
+#line 2350 "Zend/zend_language_scanner.c"
 yy74:
 		YYDEBUG(74, *YYCURSOR);
 		++YYCURSOR;
@@ -2354,7 +2356,7 @@ yy74:
 		{
 	RETURN_TOKEN(T_MOD_EQUAL);
 }
-#line 2358 "Zend/zend_language_scanner.c"
+#line 2360 "Zend/zend_language_scanner.c"
 yy76:
 		YYDEBUG(76, *YYCURSOR);
 		++YYCURSOR;
@@ -2364,7 +2366,7 @@ yy76:
 		{
 	RETURN_TOKEN(T_BOOLEAN_AND);
 }
-#line 2368 "Zend/zend_language_scanner.c"
+#line 2370 "Zend/zend_language_scanner.c"
 yy78:
 		YYDEBUG(78, *YYCURSOR);
 		++YYCURSOR;
@@ -2374,7 +2376,7 @@ yy78:
 		{
 	RETURN_TOKEN(T_AND_EQUAL);
 }
-#line 2378 "Zend/zend_language_scanner.c"
+#line 2380 "Zend/zend_language_scanner.c"
 yy80:
 		YYDEBUG(80, *YYCURSOR);
 		++YYCURSOR;
@@ -2508,7 +2510,7 @@ yy92:
 		{
 	RETURN_TOKEN(T_POW);
 }
-#line 2512 "Zend/zend_language_scanner.c"
+#line 2514 "Zend/zend_language_scanner.c"
 yy94:
 		YYDEBUG(94, *YYCURSOR);
 		++YYCURSOR;
@@ -2518,7 +2520,7 @@ yy94:
 		{
 	RETURN_TOKEN(T_MUL_EQUAL);
 }
-#line 2522 "Zend/zend_language_scanner.c"
+#line 2524 "Zend/zend_language_scanner.c"
 yy96:
 		YYDEBUG(96, *YYCURSOR);
 		++YYCURSOR;
@@ -2528,7 +2530,7 @@ yy96:
 		{
 	RETURN_TOKEN(T_INC);
 }
-#line 2532 "Zend/zend_language_scanner.c"
+#line 2534 "Zend/zend_language_scanner.c"
 yy98:
 		YYDEBUG(98, *YYCURSOR);
 		++YYCURSOR;
@@ -2538,7 +2540,7 @@ yy98:
 		{
 	RETURN_TOKEN(T_PLUS_EQUAL);
 }
-#line 2542 "Zend/zend_language_scanner.c"
+#line 2544 "Zend/zend_language_scanner.c"
 yy100:
 		YYDEBUG(100, *YYCURSOR);
 		++YYCURSOR;
@@ -2548,7 +2550,7 @@ yy100:
 		{
 	RETURN_TOKEN(T_DEC);
 }
-#line 2552 "Zend/zend_language_scanner.c"
+#line 2554 "Zend/zend_language_scanner.c"
 yy102:
 		YYDEBUG(102, *YYCURSOR);
 		++YYCURSOR;
@@ -2558,7 +2560,7 @@ yy102:
 		{
 	RETURN_TOKEN(T_MINUS_EQUAL);
 }
-#line 2562 "Zend/zend_language_scanner.c"
+#line 2564 "Zend/zend_language_scanner.c"
 yy104:
 		YYDEBUG(104, *YYCURSOR);
 		++YYCURSOR;
@@ -2569,7 +2571,7 @@ yy104:
 	yy_push_state(ST_LOOKING_FOR_PROPERTY);
 	RETURN_TOKEN(T_OBJECT_OPERATOR);
 }
-#line 2573 "Zend/zend_language_scanner.c"
+#line 2575 "Zend/zend_language_scanner.c"
 yy106:
 		YYDEBUG(106, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2601,7 +2603,7 @@ yy109:
 	ZEND_ASSERT(end == yytext + yyleng);
 	RETURN_TOKEN_WITH_VAL(T_DNUMBER);
 }
-#line 2605 "Zend/zend_language_scanner.c"
+#line 2607 "Zend/zend_language_scanner.c"
 yy110:
 		YYDEBUG(110, *YYCURSOR);
 		++YYCURSOR;
@@ -2611,7 +2613,7 @@ yy110:
 		{
 	RETURN_TOKEN(T_CONCAT_EQUAL);
 }
-#line 2615 "Zend/zend_language_scanner.c"
+#line 2617 "Zend/zend_language_scanner.c"
 yy112:
 		YYDEBUG(112, *YYCURSOR);
 		yyaccept = 4;
@@ -2639,7 +2641,7 @@ yy113:
 
 	if (YYCURSOR < YYLIMIT) {
 		YYCURSOR++;
-	} else {
+	} else if (!SCNG(heredoc_scan_ahead)) {
 		zend_error(E_COMPILE_WARNING, "Unterminated comment starting line %d", CG(zend_lineno));
 	}
 
@@ -2659,7 +2661,7 @@ yy113:
 	}
 	RETURN_TOKEN(T_COMMENT);
 }
-#line 2663 "Zend/zend_language_scanner.c"
+#line 2665 "Zend/zend_language_scanner.c"
 yy114:
 		YYDEBUG(114, *YYCURSOR);
 		++YYCURSOR;
@@ -2669,7 +2671,7 @@ yy114:
 		{
 	RETURN_TOKEN(T_DIV_EQUAL);
 }
-#line 2673 "Zend/zend_language_scanner.c"
+#line 2675 "Zend/zend_language_scanner.c"
 yy116:
 		YYDEBUG(116, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2705,7 +2707,7 @@ yy119:
 		{
 	RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM);
 }
-#line 2709 "Zend/zend_language_scanner.c"
+#line 2711 "Zend/zend_language_scanner.c"
 yy121:
 		YYDEBUG(121, *YYCURSOR);
 		yyaccept = 5;
@@ -2720,7 +2722,7 @@ yy122:
 		{
 	RETURN_TOKEN(T_SL);
 }
-#line 2724 "Zend/zend_language_scanner.c"
+#line 2726 "Zend/zend_language_scanner.c"
 yy123:
 		YYDEBUG(123, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2731,7 +2733,7 @@ yy123:
 		{
 	RETURN_TOKEN(T_IS_SMALLER_OR_EQUAL);
 }
-#line 2735 "Zend/zend_language_scanner.c"
+#line 2737 "Zend/zend_language_scanner.c"
 yy125:
 		YYDEBUG(125, *YYCURSOR);
 		++YYCURSOR;
@@ -2746,7 +2748,7 @@ yy126:
 		{
 	RETURN_TOKEN(T_IS_EQUAL);
 }
-#line 2750 "Zend/zend_language_scanner.c"
+#line 2752 "Zend/zend_language_scanner.c"
 yy128:
 		YYDEBUG(128, *YYCURSOR);
 		++YYCURSOR;
@@ -2756,7 +2758,7 @@ yy128:
 		{
 	RETURN_TOKEN(T_DOUBLE_ARROW);
 }
-#line 2760 "Zend/zend_language_scanner.c"
+#line 2762 "Zend/zend_language_scanner.c"
 yy130:
 		YYDEBUG(130, *YYCURSOR);
 		++YYCURSOR;
@@ -2766,7 +2768,7 @@ yy130:
 		{
 	RETURN_TOKEN(T_IS_GREATER_OR_EQUAL);
 }
-#line 2770 "Zend/zend_language_scanner.c"
+#line 2772 "Zend/zend_language_scanner.c"
 yy132:
 		YYDEBUG(132, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2777,7 +2779,7 @@ yy132:
 		{
 	RETURN_TOKEN(T_SR);
 }
-#line 2781 "Zend/zend_language_scanner.c"
+#line 2783 "Zend/zend_language_scanner.c"
 yy134:
 		YYDEBUG(134, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2797,7 +2799,7 @@ yy135:
 	}
 	RETURN_TOKEN(T_CLOSE_TAG);
 }
-#line 2801 "Zend/zend_language_scanner.c"
+#line 2803 "Zend/zend_language_scanner.c"
 yy136:
 		YYDEBUG(136, *YYCURSOR);
 		++YYCURSOR;
@@ -2807,7 +2809,7 @@ yy136:
 		{
 	RETURN_TOKEN(T_COALESCE);
 }
-#line 2811 "Zend/zend_language_scanner.c"
+#line 2813 "Zend/zend_language_scanner.c"
 yy138:
 		YYDEBUG(138, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2838,7 +2840,7 @@ yy141:
 		{
 	RETURN_TOKEN(T_AS);
 }
-#line 2842 "Zend/zend_language_scanner.c"
+#line 2844 "Zend/zend_language_scanner.c"
 yy143:
 		YYDEBUG(143, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -2928,7 +2930,7 @@ yy150:
 		{
 	RETURN_TOKEN(T_DO);
 }
-#line 2932 "Zend/zend_language_scanner.c"
+#line 2934 "Zend/zend_language_scanner.c"
 yy152:
 		YYDEBUG(152, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3017,7 +3019,7 @@ yy163:
 		{
 	RETURN_TOKEN(T_IF);
 }
-#line 3021 "Zend/zend_language_scanner.c"
+#line 3023 "Zend/zend_language_scanner.c"
 yy165:
 		YYDEBUG(165, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3082,7 +3084,7 @@ yy171:
 		{
 	RETURN_TOKEN(T_LOGICAL_OR);
 }
-#line 3086 "Zend/zend_language_scanner.c"
+#line 3088 "Zend/zend_language_scanner.c"
 yy173:
 		YYDEBUG(173, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3200,7 +3202,7 @@ yy186:
 		{
 	RETURN_TOKEN(T_XOR_EQUAL);
 }
-#line 3204 "Zend/zend_language_scanner.c"
+#line 3206 "Zend/zend_language_scanner.c"
 yy188:
 		YYDEBUG(188, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3232,7 +3234,7 @@ yy189:
 		{
 	RETURN_TOKEN(T_OR_EQUAL);
 }
-#line 3236 "Zend/zend_language_scanner.c"
+#line 3238 "Zend/zend_language_scanner.c"
 yy191:
 		YYDEBUG(191, *YYCURSOR);
 		++YYCURSOR;
@@ -3242,7 +3244,7 @@ yy191:
 		{
 	RETURN_TOKEN(T_BOOLEAN_OR);
 }
-#line 3246 "Zend/zend_language_scanner.c"
+#line 3248 "Zend/zend_language_scanner.c"
 yy193:
 		YYDEBUG(193, *YYCURSOR);
 		++YYCURSOR;
@@ -3252,7 +3254,7 @@ yy193:
 		{
 	RETURN_TOKEN(T_IS_NOT_IDENTICAL);
 }
-#line 3256 "Zend/zend_language_scanner.c"
+#line 3258 "Zend/zend_language_scanner.c"
 yy195:
 		YYDEBUG(195, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3322,7 +3324,7 @@ yy205:
 		{
 	RETURN_TOKEN(T_POW_EQUAL);
 }
-#line 3326 "Zend/zend_language_scanner.c"
+#line 3328 "Zend/zend_language_scanner.c"
 yy207:
 		YYDEBUG(207, *YYCURSOR);
 		++YYCURSOR;
@@ -3332,7 +3334,7 @@ yy207:
 		{
 	RETURN_TOKEN(T_ELLIPSIS);
 }
-#line 3336 "Zend/zend_language_scanner.c"
+#line 3338 "Zend/zend_language_scanner.c"
 yy209:
 		YYDEBUG(209, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3384,7 +3386,7 @@ yy210:
 		RETURN_TOKEN_WITH_VAL(T_DNUMBER);
 	}
 }
-#line 3388 "Zend/zend_language_scanner.c"
+#line 3390 "Zend/zend_language_scanner.c"
 yy213:
 		YYDEBUG(213, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3438,7 +3440,7 @@ yy216:
 		RETURN_TOKEN_WITH_VAL(T_DNUMBER);
 	}
 }
-#line 3442 "Zend/zend_language_scanner.c"
+#line 3444 "Zend/zend_language_scanner.c"
 yy219:
 		YYDEBUG(219, *YYCURSOR);
 		++YYCURSOR;
@@ -3477,7 +3479,7 @@ yy221:
 		{
 	RETURN_TOKEN(T_SL_EQUAL);
 }
-#line 3481 "Zend/zend_language_scanner.c"
+#line 3483 "Zend/zend_language_scanner.c"
 yy223:
 		YYDEBUG(223, *YYCURSOR);
 		++YYCURSOR;
@@ -3487,7 +3489,7 @@ yy223:
 		{
 	RETURN_TOKEN(T_SPACESHIP);
 }
-#line 3491 "Zend/zend_language_scanner.c"
+#line 3493 "Zend/zend_language_scanner.c"
 yy225:
 		YYDEBUG(225, *YYCURSOR);
 		++YYCURSOR;
@@ -3497,7 +3499,7 @@ yy225:
 		{
 	RETURN_TOKEN(T_IS_IDENTICAL);
 }
-#line 3501 "Zend/zend_language_scanner.c"
+#line 3503 "Zend/zend_language_scanner.c"
 yy227:
 		YYDEBUG(227, *YYCURSOR);
 		++YYCURSOR;
@@ -3507,7 +3509,7 @@ yy227:
 		{
 	RETURN_TOKEN(T_SR_EQUAL);
 }
-#line 3511 "Zend/zend_language_scanner.c"
+#line 3513 "Zend/zend_language_scanner.c"
 yy229:
 		YYDEBUG(229, *YYCURSOR);
 		++YYCURSOR;
@@ -3535,7 +3537,7 @@ yy232:
 		{
 	RETURN_TOKEN(T_LOGICAL_AND);
 }
-#line 3539 "Zend/zend_language_scanner.c"
+#line 3541 "Zend/zend_language_scanner.c"
 yy234:
 		YYDEBUG(234, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3620,7 +3622,7 @@ yy245:
 		{
 	RETURN_TOKEN(T_EXIT);
 }
-#line 3624 "Zend/zend_language_scanner.c"
+#line 3626 "Zend/zend_language_scanner.c"
 yy247:
 		YYDEBUG(247, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3706,7 +3708,7 @@ yy256:
 		{
 	RETURN_TOKEN(T_FOR);
 }
-#line 3710 "Zend/zend_language_scanner.c"
+#line 3712 "Zend/zend_language_scanner.c"
 yy257:
 		YYDEBUG(257, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3779,7 +3781,7 @@ yy267:
 		{
 	RETURN_TOKEN(T_NEW);
 }
-#line 3783 "Zend/zend_language_scanner.c"
+#line 3785 "Zend/zend_language_scanner.c"
 yy269:
 		YYDEBUG(269, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3856,7 +3858,7 @@ yy278:
 		{
 	RETURN_TOKEN(T_TRY);
 }
-#line 3860 "Zend/zend_language_scanner.c"
+#line 3862 "Zend/zend_language_scanner.c"
 yy280:
 		YYDEBUG(280, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3875,7 +3877,7 @@ yy281:
 		{
 	RETURN_TOKEN(T_USE);
 }
-#line 3879 "Zend/zend_language_scanner.c"
+#line 3881 "Zend/zend_language_scanner.c"
 yy283:
 		YYDEBUG(283, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3888,7 +3890,7 @@ yy283:
 		{
 	RETURN_TOKEN(T_VAR);
 }
-#line 3892 "Zend/zend_language_scanner.c"
+#line 3894 "Zend/zend_language_scanner.c"
 yy285:
 		YYDEBUG(285, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -3907,7 +3909,7 @@ yy286:
 		{
 	RETURN_TOKEN(T_LOGICAL_XOR);
 }
-#line 3911 "Zend/zend_language_scanner.c"
+#line 3913 "Zend/zend_language_scanner.c"
 yy288:
 		YYDEBUG(288, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4125,7 +4127,7 @@ yy317:
 		{
 	RETURN_TOKEN(T_CASE);
 }
-#line 4129 "Zend/zend_language_scanner.c"
+#line 4131 "Zend/zend_language_scanner.c"
 yy319:
 		YYDEBUG(319, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4180,7 +4182,7 @@ yy326:
 		{
 	RETURN_TOKEN(T_ECHO);
 }
-#line 4184 "Zend/zend_language_scanner.c"
+#line 4186 "Zend/zend_language_scanner.c"
 yy328:
 		YYDEBUG(328, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4208,7 +4210,7 @@ yy329:
 		{
 	RETURN_TOKEN(T_ELSE);
 }
-#line 4212 "Zend/zend_language_scanner.c"
+#line 4214 "Zend/zend_language_scanner.c"
 yy330:
 		YYDEBUG(330, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4257,7 +4259,7 @@ yy336:
 		{
 	RETURN_TOKEN(T_EVAL);
 }
-#line 4261 "Zend/zend_language_scanner.c"
+#line 4263 "Zend/zend_language_scanner.c"
 yy338:
 		YYDEBUG(338, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4270,7 +4272,7 @@ yy338:
 		{
 	RETURN_TOKEN(T_EXIT);
 }
-#line 4274 "Zend/zend_language_scanner.c"
+#line 4276 "Zend/zend_language_scanner.c"
 yy340:
 		YYDEBUG(340, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4313,7 +4315,7 @@ yy345:
 		{
 	RETURN_TOKEN(T_GOTO);
 }
-#line 4317 "Zend/zend_language_scanner.c"
+#line 4319 "Zend/zend_language_scanner.c"
 yy347:
 		YYDEBUG(347, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4366,7 +4368,7 @@ yy352:
 		{
 	RETURN_TOKEN(T_LIST);
 }
-#line 4370 "Zend/zend_language_scanner.c"
+#line 4372 "Zend/zend_language_scanner.c"
 yy354:
 		YYDEBUG(354, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4557,7 +4559,7 @@ yy383:
 		{
 	RETURN_TOKEN(T_INT_CAST);
 }
-#line 4561 "Zend/zend_language_scanner.c"
+#line 4563 "Zend/zend_language_scanner.c"
 yy386:
 		YYDEBUG(386, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4786,7 +4788,7 @@ yy397:
 
 	RETURN_TOKEN(T_START_HEREDOC);
 }
-#line 4790 "Zend/zend_language_scanner.c"
+#line 4792 "Zend/zend_language_scanner.c"
 yy398:
 		YYDEBUG(398, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4810,7 +4812,7 @@ yy400:
 		{
 	RETURN_TOKEN(T_ARRAY);
 }
-#line 4814 "Zend/zend_language_scanner.c"
+#line 4816 "Zend/zend_language_scanner.c"
 yy402:
 		YYDEBUG(402, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4823,7 +4825,7 @@ yy402:
 		{
 	RETURN_TOKEN(T_BREAK);
 }
-#line 4827 "Zend/zend_language_scanner.c"
+#line 4829 "Zend/zend_language_scanner.c"
 yy404:
 		YYDEBUG(404, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4842,7 +4844,7 @@ yy405:
 		{
 	RETURN_TOKEN(T_CATCH);
 }
-#line 4846 "Zend/zend_language_scanner.c"
+#line 4848 "Zend/zend_language_scanner.c"
 yy407:
 		YYDEBUG(407, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4855,7 +4857,7 @@ yy407:
 		{
 	RETURN_TOKEN(T_CLASS);
 }
-#line 4859 "Zend/zend_language_scanner.c"
+#line 4861 "Zend/zend_language_scanner.c"
 yy409:
 		YYDEBUG(409, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4868,7 +4870,7 @@ yy409:
 		{
 	RETURN_TOKEN(T_CLONE);
 }
-#line 4872 "Zend/zend_language_scanner.c"
+#line 4874 "Zend/zend_language_scanner.c"
 yy411:
 		YYDEBUG(411, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4881,7 +4883,7 @@ yy411:
 		{
 	RETURN_TOKEN(T_CONST);
 }
-#line 4885 "Zend/zend_language_scanner.c"
+#line 4887 "Zend/zend_language_scanner.c"
 yy413:
 		YYDEBUG(413, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4918,7 +4920,7 @@ yy417:
 		{
 	RETURN_TOKEN(T_EMPTY);
 }
-#line 4922 "Zend/zend_language_scanner.c"
+#line 4924 "Zend/zend_language_scanner.c"
 yy419:
 		YYDEBUG(419, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4943,7 +4945,7 @@ yy421:
 		{
 	RETURN_TOKEN(T_ENDIF);
 }
-#line 4947 "Zend/zend_language_scanner.c"
+#line 4949 "Zend/zend_language_scanner.c"
 yy423:
 		YYDEBUG(423, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -4989,7 +4991,7 @@ yy427:
 		{
 	RETURN_TOKEN(T_FINAL);
 }
-#line 4993 "Zend/zend_language_scanner.c"
+#line 4995 "Zend/zend_language_scanner.c"
 yy428:
 		YYDEBUG(428, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5050,7 +5052,7 @@ yy436:
 		{
 	RETURN_TOKEN(T_ISSET);
 }
-#line 5054 "Zend/zend_language_scanner.c"
+#line 5056 "Zend/zend_language_scanner.c"
 yy438:
 		YYDEBUG(438, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5069,7 +5071,7 @@ yy439:
 		{
 	RETURN_TOKEN(T_PRINT);
 }
-#line 5073 "Zend/zend_language_scanner.c"
+#line 5075 "Zend/zend_language_scanner.c"
 yy441:
 		YYDEBUG(441, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5124,7 +5126,7 @@ yy448:
 		{
 	RETURN_TOKEN(T_THROW);
 }
-#line 5128 "Zend/zend_language_scanner.c"
+#line 5130 "Zend/zend_language_scanner.c"
 yy450:
 		YYDEBUG(450, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5137,7 +5139,7 @@ yy450:
 		{
 	RETURN_TOKEN(T_TRAIT);
 }
-#line 5141 "Zend/zend_language_scanner.c"
+#line 5143 "Zend/zend_language_scanner.c"
 yy452:
 		YYDEBUG(452, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5150,7 +5152,7 @@ yy452:
 		{
 	RETURN_TOKEN(T_UNSET);
 }
-#line 5154 "Zend/zend_language_scanner.c"
+#line 5156 "Zend/zend_language_scanner.c"
 yy454:
 		YYDEBUG(454, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5163,7 +5165,7 @@ yy454:
 		{
 	RETURN_TOKEN(T_WHILE);
 }
-#line 5167 "Zend/zend_language_scanner.c"
+#line 5169 "Zend/zend_language_scanner.c"
 yy456:
 		YYDEBUG(456, *YYCURSOR);
 		yyaccept = 6;
@@ -5185,7 +5187,7 @@ yy457:
 		{
 	RETURN_TOKEN(T_YIELD);
 }
-#line 5189 "Zend/zend_language_scanner.c"
+#line 5191 "Zend/zend_language_scanner.c"
 yy458:
 		YYDEBUG(458, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5281,7 +5283,7 @@ yy471:
 		{
 	RETURN_TOKEN(T_BOOL_CAST);
 }
-#line 5285 "Zend/zend_language_scanner.c"
+#line 5287 "Zend/zend_language_scanner.c"
 yy474:
 		YYDEBUG(474, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5315,7 +5317,7 @@ yy478:
 		{
 	RETURN_TOKEN(T_DOUBLE_CAST);
 }
-#line 5319 "Zend/zend_language_scanner.c"
+#line 5321 "Zend/zend_language_scanner.c"
 yy480:
 		YYDEBUG(480, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5384,7 +5386,7 @@ yy489:
 		{
 	RETURN_TOKEN(T_ELSEIF);
 }
-#line 5388 "Zend/zend_language_scanner.c"
+#line 5390 "Zend/zend_language_scanner.c"
 yy491:
 		YYDEBUG(491, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5418,7 +5420,7 @@ yy493:
 		{
 	RETURN_TOKEN(T_ENDFOR);
 }
-#line 5422 "Zend/zend_language_scanner.c"
+#line 5424 "Zend/zend_language_scanner.c"
 yy494:
 		YYDEBUG(494, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5467,7 +5469,7 @@ yy500:
 		{
 	RETURN_TOKEN(T_GLOBAL);
 }
-#line 5471 "Zend/zend_language_scanner.c"
+#line 5473 "Zend/zend_language_scanner.c"
 yy502:
 		YYDEBUG(502, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5528,7 +5530,7 @@ yy510:
 		{
 	RETURN_TOKEN(T_PUBLIC);
 }
-#line 5532 "Zend/zend_language_scanner.c"
+#line 5534 "Zend/zend_language_scanner.c"
 yy512:
 		YYDEBUG(512, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5547,7 +5549,7 @@ yy513:
 		{
 	RETURN_TOKEN(T_RETURN);
 }
-#line 5551 "Zend/zend_language_scanner.c"
+#line 5553 "Zend/zend_language_scanner.c"
 yy515:
 		YYDEBUG(515, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5560,7 +5562,7 @@ yy515:
 		{
 	RETURN_TOKEN(T_STATIC);
 }
-#line 5564 "Zend/zend_language_scanner.c"
+#line 5566 "Zend/zend_language_scanner.c"
 yy517:
 		YYDEBUG(517, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5573,7 +5575,7 @@ yy517:
 		{
 	RETURN_TOKEN(T_SWITCH);
 }
-#line 5577 "Zend/zend_language_scanner.c"
+#line 5579 "Zend/zend_language_scanner.c"
 yy519:
 		YYDEBUG(519, *YYCURSOR);
 		++YYCURSOR;
@@ -5657,7 +5659,7 @@ yy530:
 		{
 	RETURN_TOKEN(T_ARRAY_CAST);
 }
-#line 5661 "Zend/zend_language_scanner.c"
+#line 5663 "Zend/zend_language_scanner.c"
 yy532:
 		YYDEBUG(532, *YYCURSOR);
 		++YYCURSOR;
@@ -5707,7 +5709,7 @@ yy538:
 		{
 	RETURN_TOKEN(T_UNSET_CAST);
 }
-#line 5711 "Zend/zend_language_scanner.c"
+#line 5713 "Zend/zend_language_scanner.c"
 yy540:
 		YYDEBUG(540, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5738,7 +5740,7 @@ yy543:
 		{
 	RETURN_TOKEN(T_DECLARE);
 }
-#line 5742 "Zend/zend_language_scanner.c"
+#line 5744 "Zend/zend_language_scanner.c"
 yy545:
 		YYDEBUG(545, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5751,7 +5753,7 @@ yy545:
 		{
 	RETURN_TOKEN(T_DEFAULT);
 }
-#line 5755 "Zend/zend_language_scanner.c"
+#line 5757 "Zend/zend_language_scanner.c"
 yy547:
 		YYDEBUG(547, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5788,7 +5790,7 @@ yy551:
 		{
 	RETURN_TOKEN(T_EXTENDS);
 }
-#line 5792 "Zend/zend_language_scanner.c"
+#line 5794 "Zend/zend_language_scanner.c"
 yy553:
 		YYDEBUG(553, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5801,7 +5803,7 @@ yy553:
 		{
 	RETURN_TOKEN(T_FINALLY);
 }
-#line 5805 "Zend/zend_language_scanner.c"
+#line 5807 "Zend/zend_language_scanner.c"
 yy555:
 		YYDEBUG(555, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5814,7 +5816,7 @@ yy555:
 		{
 	RETURN_TOKEN(T_FOREACH);
 }
-#line 5818 "Zend/zend_language_scanner.c"
+#line 5820 "Zend/zend_language_scanner.c"
 yy557:
 		YYDEBUG(557, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5852,7 +5854,7 @@ yy560:
 		{
 	RETURN_TOKEN(T_INCLUDE);
 }
-#line 5856 "Zend/zend_language_scanner.c"
+#line 5858 "Zend/zend_language_scanner.c"
 yy561:
 		YYDEBUG(561, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5889,7 +5891,7 @@ yy565:
 		{
 	RETURN_TOKEN(T_PRIVATE);
 }
-#line 5893 "Zend/zend_language_scanner.c"
+#line 5895 "Zend/zend_language_scanner.c"
 yy567:
 		YYDEBUG(567, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5921,7 +5923,7 @@ yy569:
 		{
 	RETURN_TOKEN(T_REQUIRE);
 }
-#line 5925 "Zend/zend_language_scanner.c"
+#line 5927 "Zend/zend_language_scanner.c"
 yy570:
 		YYDEBUG(570, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5945,7 +5947,7 @@ yy572:
 		{
 	RETURN_TOKEN(T_DIR);
 }
-#line 5949 "Zend/zend_language_scanner.c"
+#line 5951 "Zend/zend_language_scanner.c"
 yy574:
 		YYDEBUG(574, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -5994,7 +5996,7 @@ yy581:
 		{
 	RETURN_TOKEN(T_STRING_CAST);
 }
-#line 5998 "Zend/zend_language_scanner.c"
+#line 6000 "Zend/zend_language_scanner.c"
 yy583:
 		YYDEBUG(583, *YYCURSOR);
 		++YYCURSOR;
@@ -6004,7 +6006,7 @@ yy583:
 		{
 	RETURN_TOKEN(T_OBJECT_CAST);
 }
-#line 6008 "Zend/zend_language_scanner.c"
+#line 6010 "Zend/zend_language_scanner.c"
 yy585:
 		YYDEBUG(585, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6017,7 +6019,7 @@ yy585:
 		{
 	RETURN_TOKEN(T_ABSTRACT);
 }
-#line 6021 "Zend/zend_language_scanner.c"
+#line 6023 "Zend/zend_language_scanner.c"
 yy587:
 		YYDEBUG(587, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6030,7 +6032,7 @@ yy587:
 		{
 	RETURN_TOKEN(T_CALLABLE);
 }
-#line 6034 "Zend/zend_language_scanner.c"
+#line 6036 "Zend/zend_language_scanner.c"
 yy589:
 		YYDEBUG(589, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6043,7 +6045,7 @@ yy589:
 		{
 	RETURN_TOKEN(T_CONTINUE);
 }
-#line 6047 "Zend/zend_language_scanner.c"
+#line 6049 "Zend/zend_language_scanner.c"
 yy591:
 		YYDEBUG(591, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6074,7 +6076,7 @@ yy594:
 		{
 	RETURN_TOKEN(T_ENDWHILE);
 }
-#line 6078 "Zend/zend_language_scanner.c"
+#line 6080 "Zend/zend_language_scanner.c"
 yy596:
 		YYDEBUG(596, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6087,7 +6089,7 @@ yy596:
 		{
 	RETURN_TOKEN(T_FUNCTION);
 }
-#line 6091 "Zend/zend_language_scanner.c"
+#line 6093 "Zend/zend_language_scanner.c"
 yy598:
 		YYDEBUG(598, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6159,7 +6161,7 @@ yy608:
 		{
 	RETURN_TOKEN(T_FILE);
 }
-#line 6163 "Zend/zend_language_scanner.c"
+#line 6165 "Zend/zend_language_scanner.c"
 yy610:
 		YYDEBUG(610, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6184,7 +6186,7 @@ yy612:
 		{
 	RETURN_TOKEN(T_LINE);
 }
-#line 6188 "Zend/zend_language_scanner.c"
+#line 6190 "Zend/zend_language_scanner.c"
 yy614:
 		YYDEBUG(614, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6225,7 +6227,7 @@ yy619:
 		{
 	RETURN_TOKEN(T_ENDSWITCH);
 }
-#line 6229 "Zend/zend_language_scanner.c"
+#line 6231 "Zend/zend_language_scanner.c"
 yy621:
 		YYDEBUG(621, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6256,7 +6258,7 @@ yy624:
 		{
     RETURN_TOKEN(T_INSTEADOF);
 }
-#line 6260 "Zend/zend_language_scanner.c"
+#line 6262 "Zend/zend_language_scanner.c"
 yy626:
 		YYDEBUG(626, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6269,7 +6271,7 @@ yy626:
 		{
 	RETURN_TOKEN(T_INTERFACE);
 }
-#line 6273 "Zend/zend_language_scanner.c"
+#line 6275 "Zend/zend_language_scanner.c"
 yy628:
 		YYDEBUG(628, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6282,7 +6284,7 @@ yy628:
 		{
 	RETURN_TOKEN(T_NAMESPACE);
 }
-#line 6286 "Zend/zend_language_scanner.c"
+#line 6288 "Zend/zend_language_scanner.c"
 yy630:
 		YYDEBUG(630, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6295,7 +6297,7 @@ yy630:
 		{
 	RETURN_TOKEN(T_PROTECTED);
 }
-#line 6299 "Zend/zend_language_scanner.c"
+#line 6301 "Zend/zend_language_scanner.c"
 yy632:
 		YYDEBUG(632, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6320,7 +6322,7 @@ yy634:
 		{
 	RETURN_TOKEN(T_CLASS_C);
 }
-#line 6324 "Zend/zend_language_scanner.c"
+#line 6326 "Zend/zend_language_scanner.c"
 yy636:
 		YYDEBUG(636, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6356,7 +6358,7 @@ yy640:
 		{
 	RETURN_TOKEN(T_TRAIT_C);
 }
-#line 6360 "Zend/zend_language_scanner.c"
+#line 6362 "Zend/zend_language_scanner.c"
 yy642:
 		YYDEBUG(642, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6369,7 +6371,7 @@ yy642:
 		{
 	RETURN_TOKEN(T_ENDDECLARE);
 }
-#line 6373 "Zend/zend_language_scanner.c"
+#line 6375 "Zend/zend_language_scanner.c"
 yy644:
 		YYDEBUG(644, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6382,7 +6384,7 @@ yy644:
 		{
 	RETURN_TOKEN(T_ENDFOREACH);
 }
-#line 6386 "Zend/zend_language_scanner.c"
+#line 6388 "Zend/zend_language_scanner.c"
 yy646:
 		YYDEBUG(646, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6395,7 +6397,7 @@ yy646:
 		{
 	RETURN_TOKEN(T_IMPLEMENTS);
 }
-#line 6399 "Zend/zend_language_scanner.c"
+#line 6401 "Zend/zend_language_scanner.c"
 yy648:
 		YYDEBUG(648, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6414,7 +6416,7 @@ yy649:
 		{
 	RETURN_TOKEN(T_INSTANCEOF);
 }
-#line 6418 "Zend/zend_language_scanner.c"
+#line 6420 "Zend/zend_language_scanner.c"
 yy651:
 		YYDEBUG(651, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6466,7 +6468,7 @@ yy655:
 		{
 	RETURN_TOKEN(T_METHOD_C);
 }
-#line 6470 "Zend/zend_language_scanner.c"
+#line 6472 "Zend/zend_language_scanner.c"
 yy657:
 		YYDEBUG(657, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6496,7 +6498,7 @@ yy660:
 	HANDLE_NEWLINES(yytext, yyleng);
 	RETURN_TOKEN(T_YIELD_FROM);
 }
-#line 6500 "Zend/zend_language_scanner.c"
+#line 6502 "Zend/zend_language_scanner.c"
 yy662:
 		YYDEBUG(662, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6525,7 +6527,7 @@ yy665:
 		{
 	RETURN_TOKEN(T_INCLUDE_ONCE);
 }
-#line 6529 "Zend/zend_language_scanner.c"
+#line 6531 "Zend/zend_language_scanner.c"
 yy667:
 		YYDEBUG(667, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6538,7 +6540,7 @@ yy667:
 		{
 	RETURN_TOKEN(T_REQUIRE_ONCE);
 }
-#line 6542 "Zend/zend_language_scanner.c"
+#line 6544 "Zend/zend_language_scanner.c"
 yy669:
 		YYDEBUG(669, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6551,7 +6553,7 @@ yy669:
 		{
 	RETURN_TOKEN(T_FUNC_C);
 }
-#line 6555 "Zend/zend_language_scanner.c"
+#line 6557 "Zend/zend_language_scanner.c"
 yy671:
 		YYDEBUG(671, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6581,7 +6583,7 @@ yy674:
 		{
 	RETURN_TOKEN(T_NS_C);
 }
-#line 6585 "Zend/zend_language_scanner.c"
+#line 6587 "Zend/zend_language_scanner.c"
 yy676:
 		YYDEBUG(676, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6599,7 +6601,7 @@ yy677:
 		{
 	RETURN_TOKEN(T_HALT_COMPILER);
 }
-#line 6603 "Zend/zend_language_scanner.c"
+#line 6605 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_LOOKING_FOR_PROPERTY:
@@ -6671,7 +6673,7 @@ yy682:
 	yy_pop_state();
 	goto restart;
 }
-#line 6675 "Zend/zend_language_scanner.c"
+#line 6677 "Zend/zend_language_scanner.c"
 yy683:
 		YYDEBUG(683, *YYCURSOR);
 		++YYCURSOR;
@@ -6687,7 +6689,7 @@ yy683:
 		{
 	goto return_whitespace;
 }
-#line 6691 "Zend/zend_language_scanner.c"
+#line 6693 "Zend/zend_language_scanner.c"
 yy686:
 		YYDEBUG(686, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6709,7 +6711,7 @@ yy687:
 	yy_pop_state();
 	RETURN_TOKEN_WITH_STR(T_STRING, 0);
 }
-#line 6713 "Zend/zend_language_scanner.c"
+#line 6715 "Zend/zend_language_scanner.c"
 yy690:
 		YYDEBUG(690, *YYCURSOR);
 		++YYCURSOR;
@@ -6719,7 +6721,7 @@ yy690:
 		{
 	RETURN_TOKEN(T_OBJECT_OPERATOR);
 }
-#line 6723 "Zend/zend_language_scanner.c"
+#line 6725 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_BACKQUOTE:
@@ -6817,7 +6819,7 @@ yy695:
 		RETURN_TOKEN(T_ERROR);
 	}
 }
-#line 6821 "Zend/zend_language_scanner.c"
+#line 6823 "Zend/zend_language_scanner.c"
 yy696:
 		YYDEBUG(696, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6846,7 +6848,7 @@ yy697:
 	BEGIN(ST_IN_SCRIPTING);
 	RETURN_TOKEN('`');
 }
-#line 6850 "Zend/zend_language_scanner.c"
+#line 6852 "Zend/zend_language_scanner.c"
 yy699:
 		YYDEBUG(699, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6871,7 +6873,7 @@ yy702:
 		{
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 6875 "Zend/zend_language_scanner.c"
+#line 6877 "Zend/zend_language_scanner.c"
 yy703:
 		YYDEBUG(703, *YYCURSOR);
 		++YYCURSOR;
@@ -6882,7 +6884,7 @@ yy703:
 	yy_push_state(ST_LOOKING_FOR_VARNAME);
 	RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
 }
-#line 6886 "Zend/zend_language_scanner.c"
+#line 6888 "Zend/zend_language_scanner.c"
 yy705:
 		YYDEBUG(705, *YYCURSOR);
 		++YYCURSOR;
@@ -6894,7 +6896,7 @@ yy705:
 	yyless(1);
 	RETURN_TOKEN(T_CURLY_OPEN);
 }
-#line 6898 "Zend/zend_language_scanner.c"
+#line 6900 "Zend/zend_language_scanner.c"
 yy707:
 		YYDEBUG(707, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6914,7 +6916,7 @@ yy709:
 	yy_push_state(ST_VAR_OFFSET);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 6918 "Zend/zend_language_scanner.c"
+#line 6920 "Zend/zend_language_scanner.c"
 yy711:
 		YYDEBUG(711, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -6938,7 +6940,7 @@ yy712:
 	yy_push_state(ST_LOOKING_FOR_PROPERTY);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 6942 "Zend/zend_language_scanner.c"
+#line 6944 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_DOUBLE_QUOTES:
@@ -7044,7 +7046,7 @@ double_quotes_scan_done:
 		RETURN_TOKEN(T_ERROR);
 	}
 }
-#line 7048 "Zend/zend_language_scanner.c"
+#line 7050 "Zend/zend_language_scanner.c"
 yy718:
 		YYDEBUG(718, *YYCURSOR);
 		++YYCURSOR;
@@ -7055,7 +7057,7 @@ yy718:
 	BEGIN(ST_IN_SCRIPTING);
 	RETURN_TOKEN('"');
 }
-#line 7059 "Zend/zend_language_scanner.c"
+#line 7061 "Zend/zend_language_scanner.c"
 yy720:
 		YYDEBUG(720, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7098,7 +7100,7 @@ yy724:
 		{
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7102 "Zend/zend_language_scanner.c"
+#line 7104 "Zend/zend_language_scanner.c"
 yy725:
 		YYDEBUG(725, *YYCURSOR);
 		++YYCURSOR;
@@ -7109,7 +7111,7 @@ yy725:
 	yy_push_state(ST_LOOKING_FOR_VARNAME);
 	RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
 }
-#line 7113 "Zend/zend_language_scanner.c"
+#line 7115 "Zend/zend_language_scanner.c"
 yy727:
 		YYDEBUG(727, *YYCURSOR);
 		++YYCURSOR;
@@ -7121,7 +7123,7 @@ yy727:
 	yyless(1);
 	RETURN_TOKEN(T_CURLY_OPEN);
 }
-#line 7125 "Zend/zend_language_scanner.c"
+#line 7127 "Zend/zend_language_scanner.c"
 yy729:
 		YYDEBUG(729, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7141,7 +7143,7 @@ yy731:
 	yy_push_state(ST_VAR_OFFSET);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7145 "Zend/zend_language_scanner.c"
+#line 7147 "Zend/zend_language_scanner.c"
 yy733:
 		YYDEBUG(733, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7165,7 +7167,7 @@ yy734:
 	yy_push_state(ST_LOOKING_FOR_PROPERTY);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7169 "Zend/zend_language_scanner.c"
+#line 7171 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_HEREDOC:
@@ -7334,7 +7336,7 @@ heredoc_scan_done:
 
 	RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
 }
-#line 7338 "Zend/zend_language_scanner.c"
+#line 7340 "Zend/zend_language_scanner.c"
 yy740:
 		YYDEBUG(740, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7377,7 +7379,7 @@ yy744:
 		{
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7381 "Zend/zend_language_scanner.c"
+#line 7383 "Zend/zend_language_scanner.c"
 yy745:
 		YYDEBUG(745, *YYCURSOR);
 		++YYCURSOR;
@@ -7388,7 +7390,7 @@ yy745:
 	yy_push_state(ST_LOOKING_FOR_VARNAME);
 	RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
 }
-#line 7392 "Zend/zend_language_scanner.c"
+#line 7394 "Zend/zend_language_scanner.c"
 yy747:
 		YYDEBUG(747, *YYCURSOR);
 		++YYCURSOR;
@@ -7400,7 +7402,7 @@ yy747:
 	yyless(1);
 	RETURN_TOKEN(T_CURLY_OPEN);
 }
-#line 7404 "Zend/zend_language_scanner.c"
+#line 7406 "Zend/zend_language_scanner.c"
 yy749:
 		YYDEBUG(749, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7420,7 +7422,7 @@ yy751:
 	yy_push_state(ST_VAR_OFFSET);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7424 "Zend/zend_language_scanner.c"
+#line 7426 "Zend/zend_language_scanner.c"
 yy753:
 		YYDEBUG(753, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7444,7 +7446,7 @@ yy754:
 	yy_push_state(ST_LOOKING_FOR_PROPERTY);
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7448 "Zend/zend_language_scanner.c"
+#line 7450 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_LOOKING_FOR_VARNAME:
@@ -7508,7 +7510,7 @@ yy759:
 	yy_push_state(ST_IN_SCRIPTING);
 	goto restart;
 }
-#line 7512 "Zend/zend_language_scanner.c"
+#line 7514 "Zend/zend_language_scanner.c"
 yy760:
 		YYDEBUG(760, *YYCURSOR);
 		yych = *(YYMARKER = ++YYCURSOR);
@@ -7562,7 +7564,7 @@ yy764:
 	yy_push_state(ST_IN_SCRIPTING);
 	RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0);
 }
-#line 7566 "Zend/zend_language_scanner.c"
+#line 7568 "Zend/zend_language_scanner.c"
 	}
 /* *********************************** */
 yyc_ST_VAR_OFFSET:
@@ -7657,10 +7659,12 @@ yy768:
 		RETURN_TOKEN(END);
 	}
 
-	zend_error(E_COMPILE_WARNING,"Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	if (!SCNG(heredoc_scan_ahead)) {
+		zend_error(E_COMPILE_WARNING, "Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	}
 	goto restart;
 }
-#line 7664 "Zend/zend_language_scanner.c"
+#line 7668 "Zend/zend_language_scanner.c"
 yy770:
 		YYDEBUG(770, *YYCURSOR);
 		++YYCURSOR;
@@ -7674,7 +7678,7 @@ yy770:
 	ZVAL_NULL(zendlval);
 	RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
 }
-#line 7678 "Zend/zend_language_scanner.c"
+#line 7682 "Zend/zend_language_scanner.c"
 yy772:
 		YYDEBUG(772, *YYCURSOR);
 		++YYCURSOR;
@@ -7686,7 +7690,7 @@ yy773:
 	/* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */
 	RETURN_TOKEN(yytext[0]);
 }
-#line 7690 "Zend/zend_language_scanner.c"
+#line 7694 "Zend/zend_language_scanner.c"
 yy774:
 		YYDEBUG(774, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7737,7 +7741,7 @@ string:
 	}
 	RETURN_TOKEN_WITH_VAL(T_NUM_STRING);
 }
-#line 7741 "Zend/zend_language_scanner.c"
+#line 7745 "Zend/zend_language_scanner.c"
 yy777:
 		YYDEBUG(777, *YYCURSOR);
 		++YYCURSOR;
@@ -7763,7 +7767,7 @@ yy779:
 		{
 	RETURN_TOKEN_WITH_STR(T_STRING, 0);
 }
-#line 7767 "Zend/zend_language_scanner.c"
+#line 7771 "Zend/zend_language_scanner.c"
 yy782:
 		YYDEBUG(782, *YYCURSOR);
 		++YYCURSOR;
@@ -7774,7 +7778,7 @@ yy782:
 	yy_pop_state();
 	RETURN_TOKEN(']');
 }
-#line 7778 "Zend/zend_language_scanner.c"
+#line 7782 "Zend/zend_language_scanner.c"
 yy784:
 		YYDEBUG(784, *YYCURSOR);
 		++YYCURSOR;
@@ -7803,7 +7807,7 @@ yy786:
 		{
 	RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
 }
-#line 7807 "Zend/zend_language_scanner.c"
+#line 7811 "Zend/zend_language_scanner.c"
 yy787:
 		YYDEBUG(787, *YYCURSOR);
 		++YYCURSOR;
@@ -7824,7 +7828,7 @@ yy789:
 	}
 	RETURN_TOKEN_WITH_VAL(T_NUM_STRING);
 }
-#line 7828 "Zend/zend_language_scanner.c"
+#line 7832 "Zend/zend_language_scanner.c"
 yy790:
 		YYDEBUG(790, *YYCURSOR);
 		yych = *++YYCURSOR;
@@ -7921,7 +7925,7 @@ inline_char_handler:
 	HANDLE_NEWLINES(yytext, yyleng);
 	RETURN_TOKEN_WITH_VAL(T_INLINE_HTML);
 }
-#line 7925 "Zend/zend_language_scanner.c"
+#line 7929 "Zend/zend_language_scanner.c"
 yy801:
 	YYDEBUG(801, *YYCURSOR);
 	yych = *++YYCURSOR;
@@ -7949,7 +7953,7 @@ yy803:
 		goto inline_char_handler;
 	}
 }
-#line 7953 "Zend/zend_language_scanner.c"
+#line 7957 "Zend/zend_language_scanner.c"
 yy804:
 	YYDEBUG(804, *YYCURSOR);
 	++YYCURSOR;
@@ -7963,7 +7967,7 @@ yy804:
 	}
 	RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO);
 }
-#line 7967 "Zend/zend_language_scanner.c"
+#line 7971 "Zend/zend_language_scanner.c"
 yy806:
 	YYDEBUG(806, *YYCURSOR);
 	yych = *++YYCURSOR;
@@ -8003,7 +8007,7 @@ yy811:
 	}
 	RETURN_TOKEN(T_OPEN_TAG);
 }
-#line 8007 "Zend/zend_language_scanner.c"
+#line 8011 "Zend/zend_language_scanner.c"
 yy812:
 	YYDEBUG(812, *YYCURSOR);
 	yych = *++YYCURSOR;
@@ -8031,7 +8035,7 @@ yyc_ST_END_HEREDOC:
 	BEGIN(ST_IN_SCRIPTING);
 	RETURN_TOKEN(T_END_HEREDOC);
 }
-#line 8035 "Zend/zend_language_scanner.c"
+#line 8039 "Zend/zend_language_scanner.c"
 /* *********************************** */
 yyc_ST_NOWDOC:
 	YYDEBUG(817, *YYCURSOR);
@@ -8128,9 +8132,9 @@ nowdoc_scan_done:
 	HANDLE_NEWLINES(yytext, yyleng - newline);
 	RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
 }
-#line 8132 "Zend/zend_language_scanner.c"
+#line 8136 "Zend/zend_language_scanner.c"
 }
-#line 2759 "Zend/zend_language_scanner.l"
+#line 2761 "Zend/zend_language_scanner.l"
 
 
 emit_token_with_str:
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 69c392a9bc3..2b432abe54f 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -2098,7 +2098,7 @@ inline_char_handler:
 
 	if (YYCURSOR < YYLIMIT) {
 		YYCURSOR++;
-	} else {
+	} else if (!SCNG(heredoc_scan_ahead)) {
 		zend_error(E_COMPILE_WARNING, "Unterminated comment starting line %d", CG(zend_lineno));
 	}
 
@@ -2752,7 +2752,9 @@ nowdoc_scan_done:
 		RETURN_TOKEN(END);
 	}
 
-	zend_error(E_COMPILE_WARNING,"Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	if (!SCNG(heredoc_scan_ahead)) {
+		zend_error(E_COMPILE_WARNING, "Unexpected character in input:  '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
+	}
 	goto restart;
 }
 
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index b06f9d3ecb3..3c01b5bc761 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 1.1.1 */
+/* Generated by re2c 1.0.1 */
 #line 3 "Zend/zend_language_scanner_defs.h"
 
 enum YYCONDTYPE {
