diff options
46 files changed, 475 insertions, 622 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ef702cb30b..8a99fd2151 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -3237,7 +3237,7 @@ try_again: callable = Z_REFVAL_P(callable); goto try_again; default: - return zval_get_string(callable); + return zval_get_string_func(callable); } } /* }}} */ diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 0287b7a01a..19b8fbceee 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2568,7 +2568,7 @@ static int zend_try_compile_cv(znode *result, zend_ast *ast) /* {{{ */ if (EXPECTED(Z_TYPE_P(zv) == IS_STRING)) { name = zval_make_interned_string(zv); } else { - name = zend_new_interned_string(zval_get_string(zv)); + name = zend_new_interned_string(zval_get_string_func(zv)); } if (zend_is_auto_global(name)) { diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index a68e7d12ab..790de425d8 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -2812,7 +2812,7 @@ static zend_never_inline zend_op_array* ZEND_FASTCALL zend_include_or_eval(zval ZVAL_UNDEF(&tmp_inc_filename); if (Z_TYPE_P(inc_filename) != IS_STRING) { - ZVAL_STR(&tmp_inc_filename, zval_get_string(inc_filename)); + ZVAL_STR(&tmp_inc_filename, zval_get_string_func(inc_filename)); inc_filename = &tmp_inc_filename; } diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index a70148b461..d149154522 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -650,9 +650,7 @@ zend_op_array *compile_filename(int type, zval *filename) zend_string *opened_path = NULL; if (Z_TYPE_P(filename) != IS_STRING) { - tmp = *filename; - zval_copy_ctor(&tmp); - convert_to_string(&tmp); + ZVAL_STR(&tmp, zval_get_string(filename)); filename = &tmp; } file_handle.filename = Z_STRVAL_P(filename); @@ -1108,7 +1106,7 @@ restart: SCNG(yy_text) = YYCURSOR; -#line 1112 "Zend/zend_language_scanner.c" +#line 1110 "Zend/zend_language_scanner.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1160,7 +1158,7 @@ yyc_INITIAL: yy4: YYDEBUG(4, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1803 "Zend/zend_language_scanner.l" +#line 1801 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -1205,7 +1203,7 @@ inline_char_handler: HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_INLINE_HTML); } -#line 1209 "Zend/zend_language_scanner.c" +#line 1207 "Zend/zend_language_scanner.c" yy5: YYDEBUG(5, *YYCURSOR); yych = *++YYCURSOR; @@ -1221,7 +1219,7 @@ yy5: yy7: YYDEBUG(7, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1794 "Zend/zend_language_scanner.l" +#line 1792 "Zend/zend_language_scanner.l" { if (CG(short_tags)) { BEGIN(ST_IN_SCRIPTING); @@ -1230,18 +1228,18 @@ yy7: goto inline_char_handler; } } -#line 1234 "Zend/zend_language_scanner.c" +#line 1232 "Zend/zend_language_scanner.c" yy8: YYDEBUG(8, *YYCURSOR); ++YYCURSOR; YYDEBUG(9, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1781 "Zend/zend_language_scanner.l" +#line 1779 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO); } -#line 1245 "Zend/zend_language_scanner.c" +#line 1243 "Zend/zend_language_scanner.c" yy10: YYDEBUG(10, *YYCURSOR); yych = *++YYCURSOR; @@ -1272,13 +1270,13 @@ yy14: yy15: YYDEBUG(15, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1787 "Zend/zend_language_scanner.l" +#line 1785 "Zend/zend_language_scanner.l" { HANDLE_NEWLINE(yytext[yyleng-1]); BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN(T_OPEN_TAG); } -#line 1282 "Zend/zend_language_scanner.c" +#line 1280 "Zend/zend_language_scanner.c" yy16: YYDEBUG(16, *YYCURSOR); ++YYCURSOR; @@ -1335,7 +1333,7 @@ yyc_ST_BACKQUOTE: yy20: YYDEBUG(20, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2216 "Zend/zend_language_scanner.l" +#line 2214 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -1376,7 +1374,7 @@ yy20: zend_scan_escape_string(zendlval, yytext, yyleng, '`'); RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); } -#line 1380 "Zend/zend_language_scanner.c" +#line 1378 "Zend/zend_language_scanner.c" yy21: YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; @@ -1400,12 +1398,12 @@ yy22: ++YYCURSOR; YYDEBUG(23, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2160 "Zend/zend_language_scanner.l" +#line 2158 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('`'); } -#line 1409 "Zend/zend_language_scanner.c" +#line 1407 "Zend/zend_language_scanner.c" yy24: YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; @@ -1426,36 +1424,36 @@ yy25: yy27: YYDEBUG(27, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1868 "Zend/zend_language_scanner.l" +#line 1866 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1435 "Zend/zend_language_scanner.c" +#line 1433 "Zend/zend_language_scanner.c" yy28: YYDEBUG(28, *YYCURSOR); ++YYCURSOR; YYDEBUG(29, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1588 "Zend/zend_language_scanner.l" +#line 1586 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1446 "Zend/zend_language_scanner.c" +#line 1444 "Zend/zend_language_scanner.c" yy30: YYDEBUG(30, *YYCURSOR); ++YYCURSOR; YYDEBUG(31, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2147 "Zend/zend_language_scanner.l" +#line 2145 "Zend/zend_language_scanner.l" { Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1459 "Zend/zend_language_scanner.c" +#line 1457 "Zend/zend_language_scanner.c" yy32: YYDEBUG(32, *YYCURSOR); yych = *++YYCURSOR; @@ -1469,14 +1467,14 @@ yy34: ++YYCURSOR; YYDEBUG(35, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1861 "Zend/zend_language_scanner.l" +#line 1859 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1480 "Zend/zend_language_scanner.c" +#line 1478 "Zend/zend_language_scanner.c" yy36: YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; @@ -1494,14 +1492,14 @@ yy37: ++YYCURSOR; YYDEBUG(38, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1852 "Zend/zend_language_scanner.l" +#line 1850 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1505 "Zend/zend_language_scanner.c" +#line 1503 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_DOUBLE_QUOTES: @@ -1554,7 +1552,7 @@ yyc_ST_DOUBLE_QUOTES: yy42: YYDEBUG(42, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2166 "Zend/zend_language_scanner.l" +#line 2164 "Zend/zend_language_scanner.l" { if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) { YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1; @@ -1603,18 +1601,18 @@ double_quotes_scan_done: zend_scan_escape_string(zendlval, yytext, yyleng, '"'); RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); } -#line 1607 "Zend/zend_language_scanner.c" +#line 1605 "Zend/zend_language_scanner.c" yy43: YYDEBUG(43, *YYCURSOR); ++YYCURSOR; YYDEBUG(44, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2155 "Zend/zend_language_scanner.l" +#line 2153 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('"'); } -#line 1618 "Zend/zend_language_scanner.c" +#line 1616 "Zend/zend_language_scanner.c" yy45: YYDEBUG(45, *YYCURSOR); yych = *++YYCURSOR; @@ -1653,36 +1651,36 @@ yy47: yy49: YYDEBUG(49, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1868 "Zend/zend_language_scanner.l" +#line 1866 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1662 "Zend/zend_language_scanner.c" +#line 1660 "Zend/zend_language_scanner.c" yy50: YYDEBUG(50, *YYCURSOR); ++YYCURSOR; YYDEBUG(51, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1588 "Zend/zend_language_scanner.l" +#line 1586 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1673 "Zend/zend_language_scanner.c" +#line 1671 "Zend/zend_language_scanner.c" yy52: YYDEBUG(52, *YYCURSOR); ++YYCURSOR; YYDEBUG(53, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2147 "Zend/zend_language_scanner.l" +#line 2145 "Zend/zend_language_scanner.l" { Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1686 "Zend/zend_language_scanner.c" +#line 1684 "Zend/zend_language_scanner.c" yy54: YYDEBUG(54, *YYCURSOR); yych = *++YYCURSOR; @@ -1696,14 +1694,14 @@ yy56: ++YYCURSOR; YYDEBUG(57, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1861 "Zend/zend_language_scanner.l" +#line 1859 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1707 "Zend/zend_language_scanner.c" +#line 1705 "Zend/zend_language_scanner.c" yy58: YYDEBUG(58, *YYCURSOR); yych = *++YYCURSOR; @@ -1721,14 +1719,14 @@ yy59: ++YYCURSOR; YYDEBUG(60, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1852 "Zend/zend_language_scanner.l" +#line 1850 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1732 "Zend/zend_language_scanner.c" +#line 1730 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_END_HEREDOC: @@ -1739,7 +1737,7 @@ yyc_ST_END_HEREDOC: ++YYCURSOR; YYDEBUG(64, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2133 "Zend/zend_language_scanner.l" +#line 2131 "Zend/zend_language_scanner.l" { zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack)); @@ -1752,7 +1750,7 @@ yyc_ST_END_HEREDOC: BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN(T_END_HEREDOC); } -#line 1756 "Zend/zend_language_scanner.c" +#line 1754 "Zend/zend_language_scanner.c" /* *********************************** */ yyc_ST_HEREDOC: { @@ -1800,7 +1798,7 @@ yyc_ST_HEREDOC: yy68: YYDEBUG(68, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2258 "Zend/zend_language_scanner.l" +#line 2256 "Zend/zend_language_scanner.l" { int newline = 0; @@ -1873,7 +1871,7 @@ heredoc_scan_done: zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0); RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); } -#line 1877 "Zend/zend_language_scanner.c" +#line 1875 "Zend/zend_language_scanner.c" yy69: YYDEBUG(69, *YYCURSOR); yych = *++YYCURSOR; @@ -1912,36 +1910,36 @@ yy71: yy73: YYDEBUG(73, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1868 "Zend/zend_language_scanner.l" +#line 1866 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1921 "Zend/zend_language_scanner.c" +#line 1919 "Zend/zend_language_scanner.c" yy74: YYDEBUG(74, *YYCURSOR); ++YYCURSOR; YYDEBUG(75, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1588 "Zend/zend_language_scanner.l" +#line 1586 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1932 "Zend/zend_language_scanner.c" +#line 1930 "Zend/zend_language_scanner.c" yy76: YYDEBUG(76, *YYCURSOR); ++YYCURSOR; YYDEBUG(77, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2147 "Zend/zend_language_scanner.l" +#line 2145 "Zend/zend_language_scanner.l" { Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1945 "Zend/zend_language_scanner.c" +#line 1943 "Zend/zend_language_scanner.c" yy78: YYDEBUG(78, *YYCURSOR); yych = *++YYCURSOR; @@ -1955,14 +1953,14 @@ yy80: ++YYCURSOR; YYDEBUG(81, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1861 "Zend/zend_language_scanner.l" +#line 1859 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1966 "Zend/zend_language_scanner.c" +#line 1964 "Zend/zend_language_scanner.c" yy82: YYDEBUG(82, *YYCURSOR); yych = *++YYCURSOR; @@ -1980,14 +1978,14 @@ yy83: ++YYCURSOR; YYDEBUG(84, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1852 "Zend/zend_language_scanner.l" +#line 1850 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 1991 "Zend/zend_language_scanner.c" +#line 1989 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_IN_SCRIPTING: @@ -2156,7 +2154,7 @@ yy87: ++YYCURSOR; YYDEBUG(88, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2389 "Zend/zend_language_scanner.l" +#line 2387 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -2165,7 +2163,7 @@ yy87: zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); goto restart; } -#line 2169 "Zend/zend_language_scanner.c" +#line 2167 "Zend/zend_language_scanner.c" yy89: YYDEBUG(89, *YYCURSOR); ++YYCURSOR; @@ -2177,12 +2175,12 @@ yy89: } YYDEBUG(91, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1292 "Zend/zend_language_scanner.l" +#line 1290 "Zend/zend_language_scanner.l" { HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_WHITESPACE); } -#line 2186 "Zend/zend_language_scanner.c" +#line 2184 "Zend/zend_language_scanner.c" yy92: YYDEBUG(92, *YYCURSOR); ++YYCURSOR; @@ -2190,17 +2188,17 @@ yy92: yy93: YYDEBUG(93, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1577 "Zend/zend_language_scanner.l" +#line 1575 "Zend/zend_language_scanner.l" { RETURN_TOKEN(yytext[0]); } -#line 2198 "Zend/zend_language_scanner.c" +#line 2196 "Zend/zend_language_scanner.c" yy94: YYDEBUG(94, *YYCURSOR); ++YYCURSOR; YYDEBUG(95, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2037 "Zend/zend_language_scanner.l" +#line 2035 "Zend/zend_language_scanner.l" { int bprefix = (yytext[0] != '"') ? 1 : 0; @@ -2241,13 +2239,13 @@ yy94: BEGIN(ST_DOUBLE_QUOTES); RETURN_TOKEN('"'); } -#line 2245 "Zend/zend_language_scanner.c" +#line 2243 "Zend/zend_language_scanner.c" yy96: YYDEBUG(96, *YYCURSOR); ++YYCURSOR; YYDEBUG(97, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1897 "Zend/zend_language_scanner.l" +#line 1895 "Zend/zend_language_scanner.l" { while (YYCURSOR < YYLIMIT) { switch (*YYCURSOR++) { @@ -2276,7 +2274,7 @@ yy96: RETURN_TOKEN(T_COMMENT); } -#line 2280 "Zend/zend_language_scanner.c" +#line 2278 "Zend/zend_language_scanner.c" yy98: YYDEBUG(98, *YYCURSOR); yych = *++YYCURSOR; @@ -2307,7 +2305,7 @@ yy101: ++YYCURSOR; YYDEBUG(102, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1968 "Zend/zend_language_scanner.l" +#line 1966 "Zend/zend_language_scanner.l" { register char *s, *t; char *end; @@ -2375,7 +2373,7 @@ yy101: } RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING); } -#line 2379 "Zend/zend_language_scanner.c" +#line 2377 "Zend/zend_language_scanner.c" yy103: YYDEBUG(103, *YYCURSOR); yyaccept = 0; @@ -2505,7 +2503,7 @@ yy110: yy111: YYDEBUG(111, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1647 "Zend/zend_language_scanner.l" +#line 1645 "Zend/zend_language_scanner.l" { char *end; if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */ @@ -2548,7 +2546,7 @@ yy111: ZEND_ASSERT(!errno); RETURN_TOKEN(T_LNUMBER); } -#line 2552 "Zend/zend_language_scanner.c" +#line 2550 "Zend/zend_language_scanner.c" yy112: YYDEBUG(112, *YYCURSOR); yyaccept = 1; @@ -2629,12 +2627,12 @@ yy119: yy120: YYDEBUG(120, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1891 "Zend/zend_language_scanner.l" +#line 1889 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, yytext, yyleng); RETURN_TOKEN(T_STRING); } -#line 2638 "Zend/zend_language_scanner.c" +#line 2636 "Zend/zend_language_scanner.c" yy121: YYDEBUG(121, *YYCURSOR); yyaccept = 2; @@ -2919,11 +2917,11 @@ yy142: ++YYCURSOR; YYDEBUG(143, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1317 "Zend/zend_language_scanner.l" +#line 1315 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NS_SEPARATOR); } -#line 2927 "Zend/zend_language_scanner.c" +#line 2925 "Zend/zend_language_scanner.c" yy144: YYDEBUG(144, *YYCURSOR); yych = *++YYCURSOR; @@ -2939,23 +2937,23 @@ yy146: ++YYCURSOR; YYDEBUG(147, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2127 "Zend/zend_language_scanner.l" +#line 2125 "Zend/zend_language_scanner.l" { BEGIN(ST_BACKQUOTE); RETURN_TOKEN('`'); } -#line 2948 "Zend/zend_language_scanner.c" +#line 2946 "Zend/zend_language_scanner.c" yy148: YYDEBUG(148, *YYCURSOR); ++YYCURSOR; YYDEBUG(149, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1582 "Zend/zend_language_scanner.l" +#line 1580 "Zend/zend_language_scanner.l" { yy_push_state(ST_IN_SCRIPTING); RETURN_TOKEN('{'); } -#line 2959 "Zend/zend_language_scanner.c" +#line 2957 "Zend/zend_language_scanner.c" yy150: YYDEBUG(150, *YYCURSOR); yych = *++YYCURSOR; @@ -2967,7 +2965,7 @@ yy151: ++YYCURSOR; YYDEBUG(152, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1594 "Zend/zend_language_scanner.l" +#line 1592 "Zend/zend_language_scanner.l" { RESET_DOC_COMMENT(); if (!zend_stack_is_empty(&SCNG(state_stack))) { @@ -2975,7 +2973,7 @@ yy151: } RETURN_TOKEN('}'); } -#line 2979 "Zend/zend_language_scanner.c" +#line 2977 "Zend/zend_language_scanner.c" yy153: YYDEBUG(153, *YYCURSOR); ++YYCURSOR; @@ -2983,11 +2981,11 @@ yy153: yy154: YYDEBUG(154, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1481 "Zend/zend_language_scanner.l" +#line 1479 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_NOT_EQUAL); } -#line 2991 "Zend/zend_language_scanner.c" +#line 2989 "Zend/zend_language_scanner.c" yy155: YYDEBUG(155, *YYCURSOR); ++YYCURSOR; @@ -3012,42 +3010,42 @@ yy155: yy157: YYDEBUG(157, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1868 "Zend/zend_language_scanner.l" +#line 1866 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 3021 "Zend/zend_language_scanner.c" +#line 3019 "Zend/zend_language_scanner.c" yy158: YYDEBUG(158, *YYCURSOR); ++YYCURSOR; YYDEBUG(159, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1525 "Zend/zend_language_scanner.l" +#line 1523 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MOD_EQUAL); } -#line 3031 "Zend/zend_language_scanner.c" +#line 3029 "Zend/zend_language_scanner.c" yy160: YYDEBUG(160, *YYCURSOR); ++YYCURSOR; YYDEBUG(161, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1553 "Zend/zend_language_scanner.l" +#line 1551 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOLEAN_AND); } -#line 3041 "Zend/zend_language_scanner.c" +#line 3039 "Zend/zend_language_scanner.c" yy162: YYDEBUG(162, *YYCURSOR); ++YYCURSOR; YYDEBUG(163, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1537 "Zend/zend_language_scanner.l" +#line 1535 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_AND_EQUAL); } -#line 3051 "Zend/zend_language_scanner.c" +#line 3049 "Zend/zend_language_scanner.c" yy164: YYDEBUG(164, *YYCURSOR); ++YYCURSOR; @@ -3177,72 +3175,72 @@ yy176: if ((yych = *YYCURSOR) == '=') goto yy289; YYDEBUG(177, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1509 "Zend/zend_language_scanner.l" +#line 1507 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_POW); } -#line 3185 "Zend/zend_language_scanner.c" +#line 3183 "Zend/zend_language_scanner.c" yy178: YYDEBUG(178, *YYCURSOR); ++YYCURSOR; YYDEBUG(179, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1505 "Zend/zend_language_scanner.l" +#line 1503 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MUL_EQUAL); } -#line 3195 "Zend/zend_language_scanner.c" +#line 3193 "Zend/zend_language_scanner.c" yy180: YYDEBUG(180, *YYCURSOR); ++YYCURSOR; YYDEBUG(181, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1461 "Zend/zend_language_scanner.l" +#line 1459 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INC); } -#line 3205 "Zend/zend_language_scanner.c" +#line 3203 "Zend/zend_language_scanner.c" yy182: YYDEBUG(182, *YYCURSOR); ++YYCURSOR; YYDEBUG(183, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1497 "Zend/zend_language_scanner.l" +#line 1495 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PLUS_EQUAL); } -#line 3215 "Zend/zend_language_scanner.c" +#line 3213 "Zend/zend_language_scanner.c" yy184: YYDEBUG(184, *YYCURSOR); ++YYCURSOR; YYDEBUG(185, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1465 "Zend/zend_language_scanner.l" +#line 1463 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DEC); } -#line 3225 "Zend/zend_language_scanner.c" +#line 3223 "Zend/zend_language_scanner.c" yy186: YYDEBUG(186, *YYCURSOR); ++YYCURSOR; YYDEBUG(187, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1501 "Zend/zend_language_scanner.l" +#line 1499 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MINUS_EQUAL); } -#line 3235 "Zend/zend_language_scanner.c" +#line 3233 "Zend/zend_language_scanner.c" yy188: YYDEBUG(188, *YYCURSOR); ++YYCURSOR; YYDEBUG(189, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1287 "Zend/zend_language_scanner.l" +#line 1285 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_PROPERTY); RETURN_TOKEN(T_OBJECT_OPERATOR); } -#line 3246 "Zend/zend_language_scanner.c" +#line 3244 "Zend/zend_language_scanner.c" yy190: YYDEBUG(190, *YYCURSOR); yych = *++YYCURSOR; @@ -3265,7 +3263,7 @@ yy191: yy193: YYDEBUG(193, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1739 "Zend/zend_language_scanner.l" +#line 1737 "Zend/zend_language_scanner.l" { const char *end; @@ -3274,17 +3272,17 @@ yy193: ZEND_ASSERT(end == yytext + yyleng); RETURN_TOKEN(T_DNUMBER); } -#line 3278 "Zend/zend_language_scanner.c" +#line 3276 "Zend/zend_language_scanner.c" yy194: YYDEBUG(194, *YYCURSOR); ++YYCURSOR; YYDEBUG(195, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1521 "Zend/zend_language_scanner.l" +#line 1519 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONCAT_EQUAL); } -#line 3288 "Zend/zend_language_scanner.c" +#line 3286 "Zend/zend_language_scanner.c" yy196: YYDEBUG(196, *YYCURSOR); yyaccept = 4; @@ -3293,7 +3291,7 @@ yy196: yy197: YYDEBUG(197, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1926 "Zend/zend_language_scanner.l" +#line 1924 "Zend/zend_language_scanner.l" { int doc_com; @@ -3326,17 +3324,17 @@ yy197: RETURN_TOKEN(T_COMMENT); } -#line 3330 "Zend/zend_language_scanner.c" +#line 3328 "Zend/zend_language_scanner.c" yy198: YYDEBUG(198, *YYCURSOR); ++YYCURSOR; YYDEBUG(199, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1517 "Zend/zend_language_scanner.l" +#line 1515 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DIV_EQUAL); } -#line 3340 "Zend/zend_language_scanner.c" +#line 3338 "Zend/zend_language_scanner.c" yy200: YYDEBUG(200, *YYCURSOR); yych = *++YYCURSOR; @@ -3368,11 +3366,11 @@ yy203: ++YYCURSOR; YYDEBUG(204, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1313 "Zend/zend_language_scanner.l" +#line 1311 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM); } -#line 3376 "Zend/zend_language_scanner.c" +#line 3374 "Zend/zend_language_scanner.c" yy205: YYDEBUG(205, *YYCURSOR); yyaccept = 5; @@ -3383,22 +3381,22 @@ yy205: yy206: YYDEBUG(206, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1569 "Zend/zend_language_scanner.l" +#line 1567 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SL); } -#line 3391 "Zend/zend_language_scanner.c" +#line 3389 "Zend/zend_language_scanner.c" yy207: YYDEBUG(207, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) == '>') goto yy307; YYDEBUG(208, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1489 "Zend/zend_language_scanner.l" +#line 1487 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_SMALLER_OR_EQUAL); } -#line 3402 "Zend/zend_language_scanner.c" +#line 3400 "Zend/zend_language_scanner.c" yy209: YYDEBUG(209, *YYCURSOR); yych = *++YYCURSOR; @@ -3409,42 +3407,42 @@ yy210: if ((yych = *YYCURSOR) == '=') goto yy309; YYDEBUG(211, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1477 "Zend/zend_language_scanner.l" +#line 1475 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_EQUAL); } -#line 3417 "Zend/zend_language_scanner.c" +#line 3415 "Zend/zend_language_scanner.c" yy212: YYDEBUG(212, *YYCURSOR); ++YYCURSOR; YYDEBUG(213, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1445 "Zend/zend_language_scanner.l" +#line 1443 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DOUBLE_ARROW); } -#line 3427 "Zend/zend_language_scanner.c" +#line 3425 "Zend/zend_language_scanner.c" yy214: YYDEBUG(214, *YYCURSOR); ++YYCURSOR; YYDEBUG(215, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1493 "Zend/zend_language_scanner.l" +#line 1491 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_GREATER_OR_EQUAL); } -#line 3437 "Zend/zend_language_scanner.c" +#line 3435 "Zend/zend_language_scanner.c" yy216: YYDEBUG(216, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) == '=') goto yy311; YYDEBUG(217, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1573 "Zend/zend_language_scanner.l" +#line 1571 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SR); } -#line 3448 "Zend/zend_language_scanner.c" +#line 3446 "Zend/zend_language_scanner.c" yy218: YYDEBUG(218, *YYCURSOR); ++YYCURSOR; @@ -3453,7 +3451,7 @@ yy218: yy219: YYDEBUG(219, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1959 "Zend/zend_language_scanner.l" +#line 1957 "Zend/zend_language_scanner.l" { BEGIN(INITIAL); if (yytext[yyleng-1] != '>') { @@ -3461,17 +3459,17 @@ yy219: } RETURN_TOKEN(T_CLOSE_TAG); /* implicit ';' at php-end tag */ } -#line 3465 "Zend/zend_language_scanner.c" +#line 3463 "Zend/zend_language_scanner.c" yy220: YYDEBUG(220, *YYCURSOR); ++YYCURSOR; YYDEBUG(221, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1325 "Zend/zend_language_scanner.l" +#line 1323 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_COALESCE); } -#line 3475 "Zend/zend_language_scanner.c" +#line 3473 "Zend/zend_language_scanner.c" yy222: YYDEBUG(222, *YYCURSOR); yych = *++YYCURSOR; @@ -3498,11 +3496,11 @@ yy225: } YYDEBUG(226, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1227 "Zend/zend_language_scanner.l" +#line 1225 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_AS); } -#line 3506 "Zend/zend_language_scanner.c" +#line 3504 "Zend/zend_language_scanner.c" yy227: YYDEBUG(227, *YYCURSOR); yych = *++YYCURSOR; @@ -3588,11 +3586,11 @@ yy234: } YYDEBUG(235, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1195 "Zend/zend_language_scanner.l" +#line 1193 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DO); } -#line 3596 "Zend/zend_language_scanner.c" +#line 3594 "Zend/zend_language_scanner.c" yy236: YYDEBUG(236, *YYCURSOR); yych = *++YYCURSOR; @@ -3677,11 +3675,11 @@ yy247: } YYDEBUG(248, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1171 "Zend/zend_language_scanner.l" +#line 1169 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IF); } -#line 3685 "Zend/zend_language_scanner.c" +#line 3683 "Zend/zend_language_scanner.c" yy249: YYDEBUG(249, *YYCURSOR); yych = *++YYCURSOR; @@ -3742,11 +3740,11 @@ yy255: } YYDEBUG(256, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1557 "Zend/zend_language_scanner.l" +#line 1555 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_OR); } -#line 3750 "Zend/zend_language_scanner.c" +#line 3748 "Zend/zend_language_scanner.c" yy257: YYDEBUG(257, *YYCURSOR); yych = *++YYCURSOR; @@ -3860,11 +3858,11 @@ yy270: ++YYCURSOR; YYDEBUG(271, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1545 "Zend/zend_language_scanner.l" +#line 1543 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_XOR_EQUAL); } -#line 3868 "Zend/zend_language_scanner.c" +#line 3866 "Zend/zend_language_scanner.c" yy272: YYDEBUG(272, *YYCURSOR); yych = *++YYCURSOR; @@ -3892,31 +3890,31 @@ yy273: ++YYCURSOR; YYDEBUG(274, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1541 "Zend/zend_language_scanner.l" +#line 1539 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OR_EQUAL); } -#line 3900 "Zend/zend_language_scanner.c" +#line 3898 "Zend/zend_language_scanner.c" yy275: YYDEBUG(275, *YYCURSOR); ++YYCURSOR; YYDEBUG(276, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1549 "Zend/zend_language_scanner.l" +#line 1547 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOLEAN_OR); } -#line 3910 "Zend/zend_language_scanner.c" +#line 3908 "Zend/zend_language_scanner.c" yy277: YYDEBUG(277, *YYCURSOR); ++YYCURSOR; YYDEBUG(278, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1473 "Zend/zend_language_scanner.l" +#line 1471 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_NOT_IDENTICAL); } -#line 3920 "Zend/zend_language_scanner.c" +#line 3918 "Zend/zend_language_scanner.c" yy279: YYDEBUG(279, *YYCURSOR); yych = *++YYCURSOR; @@ -3982,21 +3980,21 @@ yy289: ++YYCURSOR; YYDEBUG(290, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1513 "Zend/zend_language_scanner.l" +#line 1511 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_POW_EQUAL); } -#line 3990 "Zend/zend_language_scanner.c" +#line 3988 "Zend/zend_language_scanner.c" yy291: YYDEBUG(291, *YYCURSOR); ++YYCURSOR; YYDEBUG(292, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1321 "Zend/zend_language_scanner.l" +#line 1319 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELLIPSIS); } -#line 4000 "Zend/zend_language_scanner.c" +#line 3998 "Zend/zend_language_scanner.c" yy293: YYDEBUG(293, *YYCURSOR); yych = *++YYCURSOR; @@ -4020,7 +4018,7 @@ yy294: } YYDEBUG(296, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1619 "Zend/zend_language_scanner.l" +#line 1617 "Zend/zend_language_scanner.l" { char *bin = yytext + 2; /* Skip "0b" */ int len = yyleng - 2; @@ -4048,7 +4046,7 @@ yy294: RETURN_TOKEN(T_DNUMBER); } } -#line 4052 "Zend/zend_language_scanner.c" +#line 4050 "Zend/zend_language_scanner.c" yy297: YYDEBUG(297, *YYCURSOR); yych = *++YYCURSOR; @@ -4074,7 +4072,7 @@ yy300: } YYDEBUG(302, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1690 "Zend/zend_language_scanner.l" +#line 1688 "Zend/zend_language_scanner.l" { char *hex = yytext + 2; /* Skip "0x" */ int len = yyleng - 2; @@ -4102,7 +4100,7 @@ yy300: RETURN_TOKEN(T_DNUMBER); } } -#line 4106 "Zend/zend_language_scanner.c" +#line 4104 "Zend/zend_language_scanner.c" yy303: YYDEBUG(303, *YYCURSOR); ++YYCURSOR; @@ -4137,41 +4135,41 @@ yy305: ++YYCURSOR; YYDEBUG(306, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1529 "Zend/zend_language_scanner.l" +#line 1527 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SL_EQUAL); } -#line 4145 "Zend/zend_language_scanner.c" +#line 4143 "Zend/zend_language_scanner.c" yy307: YYDEBUG(307, *YYCURSOR); ++YYCURSOR; YYDEBUG(308, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1485 "Zend/zend_language_scanner.l" +#line 1483 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SPACESHIP); } -#line 4155 "Zend/zend_language_scanner.c" +#line 4153 "Zend/zend_language_scanner.c" yy309: YYDEBUG(309, *YYCURSOR); ++YYCURSOR; YYDEBUG(310, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1469 "Zend/zend_language_scanner.l" +#line 1467 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_IDENTICAL); } -#line 4165 "Zend/zend_language_scanner.c" +#line 4163 "Zend/zend_language_scanner.c" yy311: YYDEBUG(311, *YYCURSOR); ++YYCURSOR; YYDEBUG(312, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1533 "Zend/zend_language_scanner.l" +#line 1531 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SR_EQUAL); } -#line 4175 "Zend/zend_language_scanner.c" +#line 4173 "Zend/zend_language_scanner.c" yy313: YYDEBUG(313, *YYCURSOR); yych = *++YYCURSOR; @@ -4195,11 +4193,11 @@ yy316: } YYDEBUG(317, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1561 "Zend/zend_language_scanner.l" +#line 1559 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_AND); } -#line 4203 "Zend/zend_language_scanner.c" +#line 4201 "Zend/zend_language_scanner.c" yy318: YYDEBUG(318, *YYCURSOR); yych = *++YYCURSOR; @@ -4280,11 +4278,11 @@ yy329: } YYDEBUG(330, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1129 "Zend/zend_language_scanner.l" +#line 1127 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXIT); } -#line 4288 "Zend/zend_language_scanner.c" +#line 4286 "Zend/zend_language_scanner.c" yy331: YYDEBUG(331, *YYCURSOR); yych = *++YYCURSOR; @@ -4366,11 +4364,11 @@ yy339: yy340: YYDEBUG(340, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1199 "Zend/zend_language_scanner.l" +#line 1197 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FOR); } -#line 4374 "Zend/zend_language_scanner.c" +#line 4372 "Zend/zend_language_scanner.c" yy341: YYDEBUG(341, *YYCURSOR); yych = *++YYCURSOR; @@ -4439,11 +4437,11 @@ yy351: } YYDEBUG(352, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1329 "Zend/zend_language_scanner.l" +#line 1327 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NEW); } -#line 4447 "Zend/zend_language_scanner.c" +#line 4445 "Zend/zend_language_scanner.c" yy353: YYDEBUG(353, *YYCURSOR); yych = *++YYCURSOR; @@ -4516,11 +4514,11 @@ yy362: } YYDEBUG(363, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1155 "Zend/zend_language_scanner.l" +#line 1153 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRY); } -#line 4524 "Zend/zend_language_scanner.c" +#line 4522 "Zend/zend_language_scanner.c" yy364: YYDEBUG(364, *YYCURSOR); yych = *++YYCURSOR; @@ -4535,11 +4533,11 @@ yy365: } YYDEBUG(366, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1393 "Zend/zend_language_scanner.l" +#line 1391 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_USE); } -#line 4543 "Zend/zend_language_scanner.c" +#line 4541 "Zend/zend_language_scanner.c" yy367: YYDEBUG(367, *YYCURSOR); ++YYCURSOR; @@ -4548,11 +4546,11 @@ yy367: } YYDEBUG(368, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1337 "Zend/zend_language_scanner.l" +#line 1335 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_VAR); } -#line 4556 "Zend/zend_language_scanner.c" +#line 4554 "Zend/zend_language_scanner.c" yy369: YYDEBUG(369, *YYCURSOR); yych = *++YYCURSOR; @@ -4567,11 +4565,11 @@ yy370: } YYDEBUG(371, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1565 "Zend/zend_language_scanner.l" +#line 1563 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_XOR); } -#line 4575 "Zend/zend_language_scanner.c" +#line 4573 "Zend/zend_language_scanner.c" yy372: YYDEBUG(372, *YYCURSOR); yych = *++YYCURSOR; @@ -4785,11 +4783,11 @@ yy401: } YYDEBUG(402, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1239 "Zend/zend_language_scanner.l" +#line 1237 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CASE); } -#line 4793 "Zend/zend_language_scanner.c" +#line 4791 "Zend/zend_language_scanner.c" yy403: YYDEBUG(403, *YYCURSOR); yych = *++YYCURSOR; @@ -4840,11 +4838,11 @@ yy410: } YYDEBUG(411, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1259 "Zend/zend_language_scanner.l" +#line 1257 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ECHO); } -#line 4848 "Zend/zend_language_scanner.c" +#line 4846 "Zend/zend_language_scanner.c" yy412: YYDEBUG(412, *YYCURSOR); ++YYCURSOR; @@ -4868,11 +4866,11 @@ yy412: yy413: YYDEBUG(413, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1183 "Zend/zend_language_scanner.l" +#line 1181 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELSE); } -#line 4876 "Zend/zend_language_scanner.c" +#line 4874 "Zend/zend_language_scanner.c" yy414: YYDEBUG(414, *YYCURSOR); yych = *++YYCURSOR; @@ -4917,11 +4915,11 @@ yy420: } YYDEBUG(421, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1369 "Zend/zend_language_scanner.l" +#line 1367 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EVAL); } -#line 4925 "Zend/zend_language_scanner.c" +#line 4923 "Zend/zend_language_scanner.c" yy422: YYDEBUG(422, *YYCURSOR); ++YYCURSOR; @@ -4930,11 +4928,11 @@ yy422: } YYDEBUG(423, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1125 "Zend/zend_language_scanner.l" +#line 1123 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXIT); } -#line 4938 "Zend/zend_language_scanner.c" +#line 4936 "Zend/zend_language_scanner.c" yy424: YYDEBUG(424, *YYCURSOR); yych = *++YYCURSOR; @@ -4973,11 +4971,11 @@ yy429: } YYDEBUG(430, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1255 "Zend/zend_language_scanner.l" +#line 1253 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_GOTO); } -#line 4981 "Zend/zend_language_scanner.c" +#line 4979 "Zend/zend_language_scanner.c" yy431: YYDEBUG(431, *YYCURSOR); yych = *++YYCURSOR; @@ -5026,11 +5024,11 @@ yy436: } YYDEBUG(437, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1449 "Zend/zend_language_scanner.l" +#line 1447 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LIST); } -#line 5034 "Zend/zend_language_scanner.c" +#line 5032 "Zend/zend_language_scanner.c" yy438: YYDEBUG(438, *YYCURSOR); yych = *++YYCURSOR; @@ -5217,11 +5215,11 @@ yy467: ++YYCURSOR; YYDEBUG(469, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1341 "Zend/zend_language_scanner.l" +#line 1339 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INT_CAST); } -#line 5225 "Zend/zend_language_scanner.c" +#line 5223 "Zend/zend_language_scanner.c" yy470: YYDEBUG(470, *YYCURSOR); yych = *++YYCURSOR; @@ -5318,7 +5316,7 @@ yy480: yy481: YYDEBUG(481, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2079 "Zend/zend_language_scanner.l" +#line 2077 "Zend/zend_language_scanner.l" { char *s; int bprefix = (yytext[0] != '<') ? 1 : 0; @@ -5365,7 +5363,7 @@ yy481: RETURN_TOKEN(T_START_HEREDOC); } -#line 5369 "Zend/zend_language_scanner.c" +#line 5367 "Zend/zend_language_scanner.c" yy482: YYDEBUG(482, *YYCURSOR); yych = *++YYCURSOR; @@ -5385,11 +5383,11 @@ yy484: } YYDEBUG(485, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1453 "Zend/zend_language_scanner.l" +#line 1451 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ARRAY); } -#line 5393 "Zend/zend_language_scanner.c" +#line 5391 "Zend/zend_language_scanner.c" yy486: YYDEBUG(486, *YYCURSOR); ++YYCURSOR; @@ -5398,11 +5396,11 @@ yy486: } YYDEBUG(487, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1247 "Zend/zend_language_scanner.l" +#line 1245 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BREAK); } -#line 5406 "Zend/zend_language_scanner.c" +#line 5404 "Zend/zend_language_scanner.c" yy488: YYDEBUG(488, *YYCURSOR); yych = *++YYCURSOR; @@ -5417,11 +5415,11 @@ yy489: } YYDEBUG(490, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1159 "Zend/zend_language_scanner.l" +#line 1157 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CATCH); } -#line 5425 "Zend/zend_language_scanner.c" +#line 5423 "Zend/zend_language_scanner.c" yy491: YYDEBUG(491, *YYCURSOR); ++YYCURSOR; @@ -5430,11 +5428,11 @@ yy491: } YYDEBUG(492, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1267 "Zend/zend_language_scanner.l" +#line 1265 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLASS); } -#line 5438 "Zend/zend_language_scanner.c" +#line 5436 "Zend/zend_language_scanner.c" yy493: YYDEBUG(493, *YYCURSOR); ++YYCURSOR; @@ -5443,11 +5441,11 @@ yy493: } YYDEBUG(494, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1333 "Zend/zend_language_scanner.l" +#line 1331 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLONE); } -#line 5451 "Zend/zend_language_scanner.c" +#line 5449 "Zend/zend_language_scanner.c" yy495: YYDEBUG(495, *YYCURSOR); ++YYCURSOR; @@ -5456,11 +5454,11 @@ yy495: } YYDEBUG(496, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1137 "Zend/zend_language_scanner.l" +#line 1135 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONST); } -#line 5464 "Zend/zend_language_scanner.c" +#line 5462 "Zend/zend_language_scanner.c" yy497: YYDEBUG(497, *YYCURSOR); yych = *++YYCURSOR; @@ -5493,11 +5491,11 @@ yy501: } YYDEBUG(502, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1409 "Zend/zend_language_scanner.l" +#line 1407 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EMPTY); } -#line 5501 "Zend/zend_language_scanner.c" +#line 5499 "Zend/zend_language_scanner.c" yy503: YYDEBUG(503, *YYCURSOR); yych = *++YYCURSOR; @@ -5518,11 +5516,11 @@ yy505: } YYDEBUG(506, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1179 "Zend/zend_language_scanner.l" +#line 1177 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDIF); } -#line 5526 "Zend/zend_language_scanner.c" +#line 5524 "Zend/zend_language_scanner.c" yy507: YYDEBUG(507, *YYCURSOR); yych = *++YYCURSOR; @@ -5564,11 +5562,11 @@ yy510: yy511: YYDEBUG(511, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1425 "Zend/zend_language_scanner.l" +#line 1423 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FINAL); } -#line 5572 "Zend/zend_language_scanner.c" +#line 5570 "Zend/zend_language_scanner.c" yy512: YYDEBUG(512, *YYCURSOR); yych = *++YYCURSOR; @@ -5625,11 +5623,11 @@ yy520: } YYDEBUG(521, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1405 "Zend/zend_language_scanner.l" +#line 1403 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ISSET); } -#line 5633 "Zend/zend_language_scanner.c" +#line 5631 "Zend/zend_language_scanner.c" yy522: YYDEBUG(522, *YYCURSOR); yych = *++YYCURSOR; @@ -5644,11 +5642,11 @@ yy523: } YYDEBUG(524, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1263 "Zend/zend_language_scanner.l" +#line 1261 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PRINT); } -#line 5652 "Zend/zend_language_scanner.c" +#line 5650 "Zend/zend_language_scanner.c" yy525: YYDEBUG(525, *YYCURSOR); yych = *++YYCURSOR; @@ -5699,11 +5697,11 @@ yy532: } YYDEBUG(533, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1167 "Zend/zend_language_scanner.l" +#line 1165 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_THROW); } -#line 5707 "Zend/zend_language_scanner.c" +#line 5705 "Zend/zend_language_scanner.c" yy534: YYDEBUG(534, *YYCURSOR); ++YYCURSOR; @@ -5712,11 +5710,11 @@ yy534: } YYDEBUG(535, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1275 "Zend/zend_language_scanner.l" +#line 1273 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRAIT); } -#line 5720 "Zend/zend_language_scanner.c" +#line 5718 "Zend/zend_language_scanner.c" yy536: YYDEBUG(536, *YYCURSOR); ++YYCURSOR; @@ -5725,11 +5723,11 @@ yy536: } YYDEBUG(537, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1441 "Zend/zend_language_scanner.l" +#line 1439 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_UNSET); } -#line 5733 "Zend/zend_language_scanner.c" +#line 5731 "Zend/zend_language_scanner.c" yy538: YYDEBUG(538, *YYCURSOR); ++YYCURSOR; @@ -5738,11 +5736,11 @@ yy538: } YYDEBUG(539, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1187 "Zend/zend_language_scanner.l" +#line 1185 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_WHILE); } -#line 5746 "Zend/zend_language_scanner.c" +#line 5744 "Zend/zend_language_scanner.c" yy540: YYDEBUG(540, *YYCURSOR); yyaccept = 6; @@ -5760,11 +5758,11 @@ yy540: yy541: YYDEBUG(541, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1151 "Zend/zend_language_scanner.l" +#line 1149 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_YIELD); } -#line 5768 "Zend/zend_language_scanner.c" +#line 5766 "Zend/zend_language_scanner.c" yy542: YYDEBUG(542, *YYCURSOR); yych = *++YYCURSOR; @@ -5856,11 +5854,11 @@ yy555: ++YYCURSOR; YYDEBUG(557, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1361 "Zend/zend_language_scanner.l" +#line 1359 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOL_CAST); } -#line 5864 "Zend/zend_language_scanner.c" +#line 5862 "Zend/zend_language_scanner.c" yy558: YYDEBUG(558, *YYCURSOR); yych = *++YYCURSOR; @@ -5890,11 +5888,11 @@ yy562: ++YYCURSOR; YYDEBUG(563, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1345 "Zend/zend_language_scanner.l" +#line 1343 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DOUBLE_CAST); } -#line 5898 "Zend/zend_language_scanner.c" +#line 5896 "Zend/zend_language_scanner.c" yy564: YYDEBUG(564, *YYCURSOR); yych = *++YYCURSOR; @@ -5959,11 +5957,11 @@ yy573: } YYDEBUG(574, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1175 "Zend/zend_language_scanner.l" +#line 1173 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELSEIF); } -#line 5967 "Zend/zend_language_scanner.c" +#line 5965 "Zend/zend_language_scanner.c" yy575: YYDEBUG(575, *YYCURSOR); yych = *++YYCURSOR; @@ -5993,11 +5991,11 @@ yy576: yy577: YYDEBUG(577, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1203 "Zend/zend_language_scanner.l" +#line 1201 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDFOR); } -#line 6001 "Zend/zend_language_scanner.c" +#line 5999 "Zend/zend_language_scanner.c" yy578: YYDEBUG(578, *YYCURSOR); yych = *++YYCURSOR; @@ -6042,11 +6040,11 @@ yy584: } YYDEBUG(585, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1401 "Zend/zend_language_scanner.l" +#line 1399 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_GLOBAL); } -#line 6050 "Zend/zend_language_scanner.c" +#line 6048 "Zend/zend_language_scanner.c" yy586: YYDEBUG(586, *YYCURSOR); yych = *++YYCURSOR; @@ -6103,11 +6101,11 @@ yy594: } YYDEBUG(595, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1437 "Zend/zend_language_scanner.l" +#line 1435 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PUBLIC); } -#line 6111 "Zend/zend_language_scanner.c" +#line 6109 "Zend/zend_language_scanner.c" yy596: YYDEBUG(596, *YYCURSOR); yych = *++YYCURSOR; @@ -6122,11 +6120,11 @@ yy597: } YYDEBUG(598, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1141 "Zend/zend_language_scanner.l" +#line 1139 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_RETURN); } -#line 6130 "Zend/zend_language_scanner.c" +#line 6128 "Zend/zend_language_scanner.c" yy599: YYDEBUG(599, *YYCURSOR); ++YYCURSOR; @@ -6135,11 +6133,11 @@ yy599: } YYDEBUG(600, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1417 "Zend/zend_language_scanner.l" +#line 1415 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_STATIC); } -#line 6143 "Zend/zend_language_scanner.c" +#line 6141 "Zend/zend_language_scanner.c" yy601: YYDEBUG(601, *YYCURSOR); ++YYCURSOR; @@ -6148,11 +6146,11 @@ yy601: } YYDEBUG(602, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1231 "Zend/zend_language_scanner.l" +#line 1229 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SWITCH); } -#line 6156 "Zend/zend_language_scanner.c" +#line 6154 "Zend/zend_language_scanner.c" yy603: YYDEBUG(603, *YYCURSOR); ++YYCURSOR; @@ -6232,11 +6230,11 @@ yy614: ++YYCURSOR; YYDEBUG(615, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1353 "Zend/zend_language_scanner.l" +#line 1351 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ARRAY_CAST); } -#line 6240 "Zend/zend_language_scanner.c" +#line 6238 "Zend/zend_language_scanner.c" yy616: YYDEBUG(616, *YYCURSOR); ++YYCURSOR; @@ -6282,11 +6280,11 @@ yy622: ++YYCURSOR; YYDEBUG(623, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1365 "Zend/zend_language_scanner.l" +#line 1363 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_UNSET_CAST); } -#line 6290 "Zend/zend_language_scanner.c" +#line 6288 "Zend/zend_language_scanner.c" yy624: YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; @@ -6313,11 +6311,11 @@ yy627: } YYDEBUG(628, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1215 "Zend/zend_language_scanner.l" +#line 1213 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DECLARE); } -#line 6321 "Zend/zend_language_scanner.c" +#line 6319 "Zend/zend_language_scanner.c" yy629: YYDEBUG(629, *YYCURSOR); ++YYCURSOR; @@ -6326,11 +6324,11 @@ yy629: } YYDEBUG(630, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1243 "Zend/zend_language_scanner.l" +#line 1241 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DEFAULT); } -#line 6334 "Zend/zend_language_scanner.c" +#line 6332 "Zend/zend_language_scanner.c" yy631: YYDEBUG(631, *YYCURSOR); yych = *++YYCURSOR; @@ -6363,11 +6361,11 @@ yy635: } YYDEBUG(636, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1279 "Zend/zend_language_scanner.l" +#line 1277 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXTENDS); } -#line 6371 "Zend/zend_language_scanner.c" +#line 6369 "Zend/zend_language_scanner.c" yy637: YYDEBUG(637, *YYCURSOR); ++YYCURSOR; @@ -6376,11 +6374,11 @@ yy637: } YYDEBUG(638, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1163 "Zend/zend_language_scanner.l" +#line 1161 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FINALLY); } -#line 6384 "Zend/zend_language_scanner.c" +#line 6382 "Zend/zend_language_scanner.c" yy639: YYDEBUG(639, *YYCURSOR); ++YYCURSOR; @@ -6389,11 +6387,11 @@ yy639: } YYDEBUG(640, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1207 "Zend/zend_language_scanner.l" +#line 1205 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FOREACH); } -#line 6397 "Zend/zend_language_scanner.c" +#line 6395 "Zend/zend_language_scanner.c" yy641: YYDEBUG(641, *YYCURSOR); yych = *++YYCURSOR; @@ -6427,11 +6425,11 @@ yy643: yy644: YYDEBUG(644, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1373 "Zend/zend_language_scanner.l" +#line 1371 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INCLUDE); } -#line 6435 "Zend/zend_language_scanner.c" +#line 6433 "Zend/zend_language_scanner.c" yy645: YYDEBUG(645, *YYCURSOR); yych = *++YYCURSOR; @@ -6464,11 +6462,11 @@ yy649: } YYDEBUG(650, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1429 "Zend/zend_language_scanner.l" +#line 1427 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PRIVATE); } -#line 6472 "Zend/zend_language_scanner.c" +#line 6470 "Zend/zend_language_scanner.c" yy651: YYDEBUG(651, *YYCURSOR); yych = *++YYCURSOR; @@ -6496,11 +6494,11 @@ yy652: yy653: YYDEBUG(653, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1381 "Zend/zend_language_scanner.l" +#line 1379 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_REQUIRE); } -#line 6504 "Zend/zend_language_scanner.c" +#line 6502 "Zend/zend_language_scanner.c" yy654: YYDEBUG(654, *YYCURSOR); yych = *++YYCURSOR; @@ -6520,11 +6518,11 @@ yy656: } YYDEBUG(657, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1772 "Zend/zend_language_scanner.l" +#line 1770 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DIR); } -#line 6528 "Zend/zend_language_scanner.c" +#line 6526 "Zend/zend_language_scanner.c" yy658: YYDEBUG(658, *YYCURSOR); yych = *++YYCURSOR; @@ -6569,21 +6567,21 @@ yy665: ++YYCURSOR; YYDEBUG(666, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1349 "Zend/zend_language_scanner.l" +#line 1347 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_STRING_CAST); } -#line 6577 "Zend/zend_language_scanner.c" +#line 6575 "Zend/zend_language_scanner.c" yy667: YYDEBUG(667, *YYCURSOR); ++YYCURSOR; YYDEBUG(668, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1357 "Zend/zend_language_scanner.l" +#line 1355 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OBJECT_CAST); } -#line 6587 "Zend/zend_language_scanner.c" +#line 6585 "Zend/zend_language_scanner.c" yy669: YYDEBUG(669, *YYCURSOR); ++YYCURSOR; @@ -6592,11 +6590,11 @@ yy669: } YYDEBUG(670, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1421 "Zend/zend_language_scanner.l" +#line 1419 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ABSTRACT); } -#line 6600 "Zend/zend_language_scanner.c" +#line 6598 "Zend/zend_language_scanner.c" yy671: YYDEBUG(671, *YYCURSOR); ++YYCURSOR; @@ -6605,11 +6603,11 @@ yy671: } YYDEBUG(672, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1457 "Zend/zend_language_scanner.l" +#line 1455 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CALLABLE); } -#line 6613 "Zend/zend_language_scanner.c" +#line 6611 "Zend/zend_language_scanner.c" yy673: YYDEBUG(673, *YYCURSOR); ++YYCURSOR; @@ -6618,11 +6616,11 @@ yy673: } YYDEBUG(674, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1251 "Zend/zend_language_scanner.l" +#line 1249 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONTINUE); } -#line 6626 "Zend/zend_language_scanner.c" +#line 6624 "Zend/zend_language_scanner.c" yy675: YYDEBUG(675, *YYCURSOR); yych = *++YYCURSOR; @@ -6649,11 +6647,11 @@ yy678: } YYDEBUG(679, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1191 "Zend/zend_language_scanner.l" +#line 1189 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDWHILE); } -#line 6657 "Zend/zend_language_scanner.c" +#line 6655 "Zend/zend_language_scanner.c" yy680: YYDEBUG(680, *YYCURSOR); ++YYCURSOR; @@ -6662,11 +6660,11 @@ yy680: } YYDEBUG(681, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1133 "Zend/zend_language_scanner.l" +#line 1131 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FUNCTION); } -#line 6670 "Zend/zend_language_scanner.c" +#line 6668 "Zend/zend_language_scanner.c" yy682: YYDEBUG(682, *YYCURSOR); yych = *++YYCURSOR; @@ -6734,11 +6732,11 @@ yy692: } YYDEBUG(693, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1768 "Zend/zend_language_scanner.l" +#line 1766 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FILE); } -#line 6742 "Zend/zend_language_scanner.c" +#line 6740 "Zend/zend_language_scanner.c" yy694: YYDEBUG(694, *YYCURSOR); yych = *++YYCURSOR; @@ -6759,11 +6757,11 @@ yy696: } YYDEBUG(697, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1764 "Zend/zend_language_scanner.l" +#line 1762 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LINE); } -#line 6767 "Zend/zend_language_scanner.c" +#line 6765 "Zend/zend_language_scanner.c" yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; @@ -6800,11 +6798,11 @@ yy703: } YYDEBUG(704, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1235 "Zend/zend_language_scanner.l" +#line 1233 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDSWITCH); } -#line 6808 "Zend/zend_language_scanner.c" +#line 6806 "Zend/zend_language_scanner.c" yy705: YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; @@ -6831,11 +6829,11 @@ yy708: } YYDEBUG(709, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1397 "Zend/zend_language_scanner.l" +#line 1395 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INSTEADOF); } -#line 6839 "Zend/zend_language_scanner.c" +#line 6837 "Zend/zend_language_scanner.c" yy710: YYDEBUG(710, *YYCURSOR); ++YYCURSOR; @@ -6844,11 +6842,11 @@ yy710: } YYDEBUG(711, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1271 "Zend/zend_language_scanner.l" +#line 1269 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INTERFACE); } -#line 6852 "Zend/zend_language_scanner.c" +#line 6850 "Zend/zend_language_scanner.c" yy712: YYDEBUG(712, *YYCURSOR); ++YYCURSOR; @@ -6857,11 +6855,11 @@ yy712: } YYDEBUG(713, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1389 "Zend/zend_language_scanner.l" +#line 1387 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NAMESPACE); } -#line 6865 "Zend/zend_language_scanner.c" +#line 6863 "Zend/zend_language_scanner.c" yy714: YYDEBUG(714, *YYCURSOR); ++YYCURSOR; @@ -6870,11 +6868,11 @@ yy714: } YYDEBUG(715, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1433 "Zend/zend_language_scanner.l" +#line 1431 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PROTECTED); } -#line 6878 "Zend/zend_language_scanner.c" +#line 6876 "Zend/zend_language_scanner.c" yy716: YYDEBUG(716, *YYCURSOR); yych = *++YYCURSOR; @@ -6895,11 +6893,11 @@ yy718: } YYDEBUG(719, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1748 "Zend/zend_language_scanner.l" +#line 1746 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLASS_C); } -#line 6903 "Zend/zend_language_scanner.c" +#line 6901 "Zend/zend_language_scanner.c" yy720: YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; @@ -6931,11 +6929,11 @@ yy724: } YYDEBUG(725, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1752 "Zend/zend_language_scanner.l" +#line 1750 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRAIT_C); } -#line 6939 "Zend/zend_language_scanner.c" +#line 6937 "Zend/zend_language_scanner.c" yy726: YYDEBUG(726, *YYCURSOR); ++YYCURSOR; @@ -6944,11 +6942,11 @@ yy726: } YYDEBUG(727, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1219 "Zend/zend_language_scanner.l" +#line 1217 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDDECLARE); } -#line 6952 "Zend/zend_language_scanner.c" +#line 6950 "Zend/zend_language_scanner.c" yy728: YYDEBUG(728, *YYCURSOR); ++YYCURSOR; @@ -6957,11 +6955,11 @@ yy728: } YYDEBUG(729, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1211 "Zend/zend_language_scanner.l" +#line 1209 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDFOREACH); } -#line 6965 "Zend/zend_language_scanner.c" +#line 6963 "Zend/zend_language_scanner.c" yy730: YYDEBUG(730, *YYCURSOR); ++YYCURSOR; @@ -6970,11 +6968,11 @@ yy730: } YYDEBUG(731, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1283 "Zend/zend_language_scanner.l" +#line 1281 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IMPLEMENTS); } -#line 6978 "Zend/zend_language_scanner.c" +#line 6976 "Zend/zend_language_scanner.c" yy732: YYDEBUG(732, *YYCURSOR); yych = *++YYCURSOR; @@ -6989,11 +6987,11 @@ yy733: } YYDEBUG(734, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1223 "Zend/zend_language_scanner.l" +#line 1221 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INSTANCEOF); } -#line 6997 "Zend/zend_language_scanner.c" +#line 6995 "Zend/zend_language_scanner.c" yy735: YYDEBUG(735, *YYCURSOR); yych = *++YYCURSOR; @@ -7041,11 +7039,11 @@ yy739: } YYDEBUG(740, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1760 "Zend/zend_language_scanner.l" +#line 1758 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_METHOD_C); } -#line 7049 "Zend/zend_language_scanner.c" +#line 7047 "Zend/zend_language_scanner.c" yy741: YYDEBUG(741, *YYCURSOR); yych = *++YYCURSOR; @@ -7069,13 +7067,13 @@ yy744: ++YYCURSOR; YYDEBUG(745, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1145 "Zend/zend_language_scanner.l" +#line 1143 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_YIELD_FROM); } -#line 7079 "Zend/zend_language_scanner.c" +#line 7077 "Zend/zend_language_scanner.c" yy746: YYDEBUG(746, *YYCURSOR); yych = *++YYCURSOR; @@ -7100,11 +7098,11 @@ yy749: } YYDEBUG(750, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1377 "Zend/zend_language_scanner.l" +#line 1375 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INCLUDE_ONCE); } -#line 7108 "Zend/zend_language_scanner.c" +#line 7106 "Zend/zend_language_scanner.c" yy751: YYDEBUG(751, *YYCURSOR); ++YYCURSOR; @@ -7113,11 +7111,11 @@ yy751: } YYDEBUG(752, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1385 "Zend/zend_language_scanner.l" +#line 1383 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_REQUIRE_ONCE); } -#line 7121 "Zend/zend_language_scanner.c" +#line 7119 "Zend/zend_language_scanner.c" yy753: YYDEBUG(753, *YYCURSOR); ++YYCURSOR; @@ -7126,11 +7124,11 @@ yy753: } YYDEBUG(754, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1756 "Zend/zend_language_scanner.l" +#line 1754 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FUNC_C); } -#line 7134 "Zend/zend_language_scanner.c" +#line 7132 "Zend/zend_language_scanner.c" yy755: YYDEBUG(755, *YYCURSOR); yych = *++YYCURSOR; @@ -7156,11 +7154,11 @@ yy758: } YYDEBUG(759, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1776 "Zend/zend_language_scanner.l" +#line 1774 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NS_C); } -#line 7164 "Zend/zend_language_scanner.c" +#line 7162 "Zend/zend_language_scanner.c" yy760: YYDEBUG(760, *YYCURSOR); yych = *++YYCURSOR; @@ -7174,11 +7172,11 @@ yy761: } YYDEBUG(762, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1413 "Zend/zend_language_scanner.l" +#line 1411 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_HALT_COMPILER); } -#line 7182 "Zend/zend_language_scanner.c" +#line 7180 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_PROPERTY: @@ -7244,13 +7242,13 @@ yy765: yy766: YYDEBUG(766, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1307 "Zend/zend_language_scanner.l" +#line 1305 "Zend/zend_language_scanner.l" { yyless(0); yy_pop_state(); goto restart; } -#line 7254 "Zend/zend_language_scanner.c" +#line 7252 "Zend/zend_language_scanner.c" yy767: YYDEBUG(767, *YYCURSOR); ++YYCURSOR; @@ -7262,12 +7260,12 @@ yy767: } YYDEBUG(769, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1292 "Zend/zend_language_scanner.l" +#line 1290 "Zend/zend_language_scanner.l" { HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_WHITESPACE); } -#line 7271 "Zend/zend_language_scanner.c" +#line 7269 "Zend/zend_language_scanner.c" yy770: YYDEBUG(770, *YYCURSOR); yych = *++YYCURSOR; @@ -7284,23 +7282,23 @@ yy771: } YYDEBUG(773, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1301 "Zend/zend_language_scanner.l" +#line 1299 "Zend/zend_language_scanner.l" { yy_pop_state(); zend_copy_value(zendlval, yytext, yyleng); RETURN_TOKEN(T_STRING); } -#line 7294 "Zend/zend_language_scanner.c" +#line 7292 "Zend/zend_language_scanner.c" yy774: YYDEBUG(774, *YYCURSOR); ++YYCURSOR; YYDEBUG(775, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1297 "Zend/zend_language_scanner.l" +#line 1295 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OBJECT_OPERATOR); } -#line 7304 "Zend/zend_language_scanner.c" +#line 7302 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_VARNAME: @@ -7357,14 +7355,14 @@ yy778: yy779: YYDEBUG(779, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1612 "Zend/zend_language_scanner.l" +#line 1610 "Zend/zend_language_scanner.l" { yyless(0); yy_pop_state(); yy_push_state(ST_IN_SCRIPTING); goto restart; } -#line 7368 "Zend/zend_language_scanner.c" +#line 7366 "Zend/zend_language_scanner.c" yy780: YYDEBUG(780, *YYCURSOR); yych = *(YYMARKER = ++YYCURSOR); @@ -7411,7 +7409,7 @@ yy784: ++YYCURSOR; YYDEBUG(785, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1603 "Zend/zend_language_scanner.l" +#line 1601 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); zend_copy_value(zendlval, yytext, yyleng); @@ -7419,7 +7417,7 @@ yy784: yy_push_state(ST_IN_SCRIPTING); RETURN_TOKEN(T_STRING_VARNAME); } -#line 7423 "Zend/zend_language_scanner.c" +#line 7421 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_NOWDOC: @@ -7430,7 +7428,7 @@ yyc_ST_NOWDOC: ++YYCURSOR; YYDEBUG(789, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2332 "Zend/zend_language_scanner.l" +#line 2330 "Zend/zend_language_scanner.l" { int newline = 0; @@ -7486,7 +7484,7 @@ nowdoc_scan_done: HANDLE_NEWLINES(yytext, yyleng - newline); RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); } -#line 7490 "Zend/zend_language_scanner.c" +#line 7488 "Zend/zend_language_scanner.c" /* *********************************** */ yyc_ST_VAR_OFFSET: { @@ -7574,7 +7572,7 @@ yy792: ++YYCURSOR; YYDEBUG(793, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2389 "Zend/zend_language_scanner.l" +#line 2387 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -7583,13 +7581,13 @@ yy792: zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); goto restart; } -#line 7587 "Zend/zend_language_scanner.c" +#line 7585 "Zend/zend_language_scanner.c" yy794: YYDEBUG(794, *YYCURSOR); ++YYCURSOR; YYDEBUG(795, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1883 "Zend/zend_language_scanner.l" +#line 1881 "Zend/zend_language_scanner.l" { /* Invalid rule to return a more explicit parse error with proper line number */ yyless(0); @@ -7597,19 +7595,19 @@ yy794: ZVAL_NULL(zendlval); RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); } -#line 7601 "Zend/zend_language_scanner.c" +#line 7599 "Zend/zend_language_scanner.c" yy796: YYDEBUG(796, *YYCURSOR); ++YYCURSOR; yy797: YYDEBUG(797, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1878 "Zend/zend_language_scanner.l" +#line 1876 "Zend/zend_language_scanner.l" { /* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */ RETURN_TOKEN(yytext[0]); } -#line 7613 "Zend/zend_language_scanner.c" +#line 7611 "Zend/zend_language_scanner.c" yy798: YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; @@ -7644,7 +7642,7 @@ yy799: yy800: YYDEBUG(800, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1718 "Zend/zend_language_scanner.l" +#line 1716 "Zend/zend_language_scanner.l" { /* Offset could be treated as a long */ if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) { char *end; @@ -7660,7 +7658,7 @@ string: } RETURN_TOKEN(T_NUM_STRING); } -#line 7664 "Zend/zend_language_scanner.c" +#line 7662 "Zend/zend_language_scanner.c" yy801: YYDEBUG(801, *YYCURSOR); ++YYCURSOR; @@ -7682,23 +7680,23 @@ yy803: } YYDEBUG(805, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1891 "Zend/zend_language_scanner.l" +#line 1889 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, yytext, yyleng); RETURN_TOKEN(T_STRING); } -#line 7691 "Zend/zend_language_scanner.c" +#line 7689 "Zend/zend_language_scanner.c" yy806: YYDEBUG(806, *YYCURSOR); ++YYCURSOR; YYDEBUG(807, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1873 "Zend/zend_language_scanner.l" +#line 1871 "Zend/zend_language_scanner.l" { yy_pop_state(); RETURN_TOKEN(']'); } -#line 7702 "Zend/zend_language_scanner.c" +#line 7700 "Zend/zend_language_scanner.c" yy808: YYDEBUG(808, *YYCURSOR); ++YYCURSOR; @@ -7723,12 +7721,12 @@ yy808: yy810: YYDEBUG(810, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1868 "Zend/zend_language_scanner.l" +#line 1866 "Zend/zend_language_scanner.l" { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); RETURN_TOKEN(T_VARIABLE); } -#line 7732 "Zend/zend_language_scanner.c" +#line 7730 "Zend/zend_language_scanner.c" yy811: YYDEBUG(811, *YYCURSOR); ++YYCURSOR; @@ -7740,12 +7738,12 @@ yy811: yy813: YYDEBUG(813, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1734 "Zend/zend_language_scanner.l" +#line 1732 "Zend/zend_language_scanner.l" { /* Offset must be treated as a string */ ZVAL_STRINGL(zendlval, yytext, yyleng); RETURN_TOKEN(T_NUM_STRING); } -#line 7749 "Zend/zend_language_scanner.c" +#line 7747 "Zend/zend_language_scanner.c" yy814: YYDEBUG(814, *YYCURSOR); yych = *++YYCURSOR; @@ -7785,6 +7783,6 @@ yy819: goto yy813; } } -#line 2398 "Zend/zend_language_scanner.l" +#line 2396 "Zend/zend_language_scanner.l" } diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index aafca1682d..46bb957660 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -648,9 +648,7 @@ zend_op_array *compile_filename(int type, zval *filename) zend_string *opened_path = NULL; if (Z_TYPE_P(filename) != IS_STRING) { - tmp = *filename; - zval_copy_ctor(&tmp); - convert_to_string(&tmp); + ZVAL_STR(&tmp, zval_get_string(filename)); filename = &tmp; } file_handle.filename = Z_STRVAL_P(filename); diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index d99fb7338f..4b2e4bc942 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -550,7 +550,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_ ZVAL_UNDEF(&tmp_member); if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_STR(&tmp_member, zval_get_string(member)); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -693,7 +693,7 @@ ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, v ZVAL_UNDEF(&tmp_member); if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_STR(&tmp_member, zval_get_string(member)); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -953,7 +953,7 @@ static void zend_std_unset_property(zval *object, zval *member, void **cache_slo ZVAL_UNDEF(&tmp_member); if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_STR(&tmp_member, zval_get_string(member)); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -1537,7 +1537,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists, ZVAL_UNDEF(&tmp_member); if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_STR(&tmp_member, zval_get_string(member)); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 7217108338..1b155f88f7 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -922,7 +922,7 @@ ZEND_API int ZEND_FASTCALL add_function(zval *result, zval *op1, zval *op2) /* { return SUCCESS; } if (result != op1) { - ZVAL_DUP(result, op1); + ZVAL_ARR(result, zend_array_dup(Z_ARR_P(op1))); } else { SEPARATE_ARRAY(result); } diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 4b93a47dd3..c508b75573 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -116,8 +116,7 @@ PHP_FUNCTION(com_create_instance) if (NULL != (tmp = zend_hash_str_find(Z_ARRVAL_P(server_params), "Flags", sizeof("Flags")-1))) { - convert_to_long_ex(tmp); - ctx = (CLSCTX)Z_LVAL_P(tmp); + ctx = (CLSCTX)zval_get_long(tmp); } } diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 9b8abe6b06..9dee67878c 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -153,11 +153,9 @@ static PHP_MINFO_FUNCTION(ctype) } else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) { \ RETURN_BOOL(iswhat((int)Z_LVAL_P(c) + 256)); \ } \ - tmp = *c; \ - zval_copy_ctor(&tmp); \ - convert_to_string(&tmp); \ + ZVAL_STR(&tmp, zval_get_string_func(c)); \ } else { \ - tmp = *c; \ + ZVAL_COPY_VALUE(&tmp, c); \ } \ if (Z_TYPE(tmp) == IS_STRING) { \ char *p = Z_STRVAL(tmp), *e = Z_STRVAL(tmp) + Z_STRLEN(tmp); \ diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 9d6f698db6..10c4db9a5b 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2035,8 +2035,7 @@ static int date_interval_has_property(zval *object, zval *member, int type, void int retval = 0; if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -4124,9 +4123,7 @@ zval *date_interval_read_property(zval *object, zval *member, int type, void **c double fvalue = -1; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -4194,9 +4191,7 @@ void date_interval_write_property(zval *object, zval *member, zval *value, void zval tmp_member; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -4245,9 +4240,7 @@ static zval *date_interval_get_property_ptr_ptr(zval *object, zval *member, int zval tmp_member, *ret; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index dd08041568..6cb374f848 100644 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -51,8 +51,7 @@ DBA_OPEN_FUNC(db1) int filemode = 0644; if (info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } gmode = 0; diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index a688809998..43ce928b02 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -72,8 +72,7 @@ DBA_OPEN_FUNC(db2) } if (info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } if (db_open(info->path, type, gmode, filemode, NULL, NULL, &dbp)) { diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index 90db5a0a06..5a893f88b5 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -84,8 +84,7 @@ DBA_OPEN_FUNC(db3) } if (info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } #ifdef DB_FCNTL_LOCKING diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 344515d820..a9d751269b 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -117,8 +117,7 @@ DBA_OPEN_FUNC(db4) } if (info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } if ((err=db_create(&dbp, NULL, 0)) == 0) { diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 3428b74905..ace1e32658 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -60,8 +60,7 @@ DBA_OPEN_FUNC(dbm) int filemode = 0644; if(info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } if(info->mode == DBA_TRUNC) { diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index a45613426d..c21d3e0063 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -54,8 +54,7 @@ DBA_OPEN_FUNC(gdbm) return FAILURE; /* not possible */ if(info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } dbf = gdbm_open(info->path, 0, gmode, filemode, NULL); diff --git a/ext/dba/dba_lmdb.c b/ext/dba/dba_lmdb.c index 6f7d2da21b..de21e0239a 100644 --- a/ext/dba/dba_lmdb.c +++ b/ext/dba/dba_lmdb.c @@ -47,8 +47,7 @@ DBA_OPEN_FUNC(lmdb) int rc, mode = 0644, flags = MDB_NOSUBDIR; if(info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - mode = Z_LVAL(info->argv[0]); + mode = zval_get_long(&info->argv[0]); /* TODO implement handling of the additional flags. */ } diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index 3b3f16719a..474d3882df 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -59,8 +59,7 @@ DBA_OPEN_FUNC(ndbm) } if(info->argc > 0) { - convert_to_long_ex(&info->argv[0]); - filemode = Z_LVAL(info->argv[0]); + filemode = zval_get_long(&info->argv[0]); } dbf = dbm_open(info->path, gmode, filemode); diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index ad1dd1e443..c8aa7fcd12 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2271,7 +2271,7 @@ PHP_FUNCTION(iconv_mime_encode) if ((pzval = zend_hash_str_find(Z_ARRVAL_P(pref), "line-break-chars", sizeof("line-break-chars") - 1)) != NULL) { if (Z_TYPE_P(pzval) != IS_STRING) { - tmp_str = zval_get_string(pzval); + tmp_str = zval_get_string_func(pzval); lfchars = ZSTR_VAL(tmp_str); } else { lfchars = Z_STRVAL_P(pzval); diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 17456e3df7..1dd4878d2f 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3609,12 +3609,10 @@ PHP_FUNCTION(imap_mail_compose) topbod = bod; if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->type = (short) Z_LVAL_P(pvalue); + bod->type = (short) zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->encoding = (short) Z_LVAL_P(pvalue); + bod->encoding = (short) zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) { convert_to_string_ex(pvalue); @@ -3682,12 +3680,10 @@ PHP_FUNCTION(imap_mail_compose) bod->contents.text.size = 0; } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->size.lines = Z_LVAL_P(pvalue); + bod->size.lines = zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->size.bytes = Z_LVAL_P(pvalue); + bod->size.bytes = zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) { convert_to_string_ex(pvalue); @@ -3696,8 +3692,7 @@ PHP_FUNCTION(imap_mail_compose) } else if (Z_TYPE_P(data) == IS_ARRAY) { short type = -1; if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) { - convert_to_long_ex(pvalue); - type = (short) Z_LVAL_P(pvalue); + type = (short) zval_get_long(pvalue); } if (!toppart) { @@ -3716,8 +3711,7 @@ PHP_FUNCTION(imap_mail_compose) } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "encoding", sizeof("encoding") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->encoding = (short) Z_LVAL_P(pvalue); + bod->encoding = (short) zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "charset", sizeof("charset") - 1)) != NULL) { convert_to_string_ex(pvalue); @@ -3786,12 +3780,10 @@ PHP_FUNCTION(imap_mail_compose) bod->contents.text.size = 0; } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "lines", sizeof("lines") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->size.lines = Z_LVAL_P(pvalue); + bod->size.lines = zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "bytes", sizeof("bytes") - 1)) != NULL) { - convert_to_long_ex(pvalue); - bod->size.bytes = Z_LVAL_P(pvalue); + bod->size.bytes = zval_get_long(pvalue); } if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "md5", sizeof("md5") - 1)) != NULL) { convert_to_string_ex(pvalue); diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c index bdf9a1e32c..b109946844 100644 --- a/ext/intl/dateformat/dateformat_parse.c +++ b/ext/intl/dateformat/dateformat_parse.c @@ -130,6 +130,7 @@ PHP_FUNCTION(datefmt_parse) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; + zend_long long_parse_pos; int32_t parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -146,13 +147,13 @@ PHP_FUNCTION(datefmt_parse) if (z_parse_pos) { ZVAL_DEREF(z_parse_pos); - convert_to_long(z_parse_pos); - if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) { + long_parse_pos = zval_get_long(z_parse_pos); + if (ZEND_LONG_INT_OVFL(long_parse_pos)) { intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR); intl_error_set_custom_msg(NULL, "String index is out of valid range.", 0); RETURN_FALSE; } - parse_pos = (int32_t)Z_LVAL_P(z_parse_pos); + parse_pos = (int32_t)long_parse_pos; if((size_t)parse_pos > text_len) { RETURN_FALSE; } @@ -174,6 +175,7 @@ PHP_FUNCTION(datefmt_localtime) char* text_to_parse = NULL; size_t text_len =0; zval* z_parse_pos = NULL; + zend_long long_parse_pos; int32_t parse_pos = -1; DATE_FORMAT_METHOD_INIT_VARS; @@ -190,13 +192,13 @@ PHP_FUNCTION(datefmt_localtime) if (z_parse_pos) { ZVAL_DEREF(z_parse_pos); - convert_to_long(z_parse_pos); - if (ZEND_LONG_INT_OVFL(Z_LVAL_P(z_parse_pos))) { + long_parse_pos = zval_get_long(z_parse_pos); + if (ZEND_LONG_INT_OVFL(long_parse_pos)) { intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR); intl_error_set_custom_msg(NULL, "String index is out of valid range.", 0); RETURN_FALSE; } - parse_pos = (int32_t)Z_LVAL_P(z_parse_pos); + parse_pos = (int32_t)long_parse_pos; if((size_t)parse_pos > text_len) { RETURN_FALSE; } diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index f5efda6119..f6aa8d0d7e 100644 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -182,12 +182,10 @@ PHP_FUNCTION( numfmt_set_attribute ) case UNUM_MIN_SIGNIFICANT_DIGITS: case UNUM_MAX_SIGNIFICANT_DIGITS: case UNUM_LENIENT_PARSE: - convert_to_long_ex(value); - unum_setAttribute(FORMATTER_OBJECT(nfo), attribute, Z_LVAL_P(value)); + unum_setAttribute(FORMATTER_OBJECT(nfo), attribute, zval_get_long(value)); break; case UNUM_ROUNDING_INCREMENT: - convert_to_double_ex(value); - unum_setDoubleAttribute(FORMATTER_OBJECT(nfo), attribute, Z_DVAL_P(value)); + unum_setDoubleAttribute(FORMATTER_OBJECT(nfo), attribute, zval_get_double(value)); break; default: INTL_DATA_ERROR_CODE(nfo) = U_UNSUPPORTED_ERROR; diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c index 37b28ae558..af0e4c8a64 100644 --- a/ext/intl/formatter/formatter_parse.c +++ b/ext/intl/formatter/formatter_parse.c @@ -69,8 +69,7 @@ PHP_FUNCTION( numfmt_parse ) if(zposition) { ZVAL_DEREF(zposition); - convert_to_long(zposition); - position = (int32_t)Z_LVAL_P( zposition ); + position = (int32_t)zval_get_long( zposition ); position_p = &position; } @@ -157,8 +156,7 @@ PHP_FUNCTION( numfmt_parse_currency ) if(zposition) { ZVAL_DEREF(zposition); - convert_to_long(zposition); - position = (int32_t)Z_LVAL_P( zposition ); + position = (int32_t)zval_get_long( zposition ); position_p = &position; } diff --git a/ext/intl/transliterator/transliterator_class.c b/ext/intl/transliterator/transliterator_class.c index ca174e2e70..1b0b99be97 100644 --- a/ext/intl/transliterator/transliterator_class.c +++ b/ext/intl/transliterator/transliterator_class.c @@ -194,9 +194,8 @@ err: zval tmp_member; \ if( Z_TYPE_P( member ) != IS_STRING ) \ { \ - tmp_member = *member; \ - zval_copy_ctor( &tmp_member ); \ - convert_to_string( &tmp_member ); \ + ZVAL_STR(&tmp_member, \ + zval_get_string_func(member)); \ member = &tmp_member; \ cache_slot = NULL; \ } diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 1b19e0599a..bd7e8ac64c 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -315,8 +315,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra int pagesize = 1; struct berval cookie = { 0, NULL }; if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "size", sizeof("size") - 1)) != NULL) { - convert_to_long_ex(tmp); - pagesize = Z_LVAL_P(tmp); + pagesize = zval_get_long(tmp); } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "cookie", sizeof("cookie") - 1)) != NULL) { convert_to_string_ex(tmp); @@ -483,8 +482,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra struct berval context; if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "before", sizeof("before") - 1)) != NULL) { - convert_to_long_ex(tmp); - vlvInfo.ldvlv_before_count = Z_LVAL_P(tmp); + vlvInfo.ldvlv_before_count = zval_get_long(tmp); } else { rc = -1; php_error_docref(NULL, E_WARNING, "Before key missing from array value for VLV control"); @@ -492,8 +490,7 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra } if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "after", sizeof("after") - 1)) != NULL) { - convert_to_long_ex(tmp); - vlvInfo.ldvlv_after_count = Z_LVAL_P(tmp); + vlvInfo.ldvlv_after_count = zval_get_long(tmp); } else { rc = -1; php_error_docref(NULL, E_WARNING, "After key missing from array value for VLV control"); @@ -507,11 +504,9 @@ static int _php_ldap_control_from_array(LDAP *ld, LDAPControl** ctrl, zval* arra vlvInfo.ldvlv_attrvalue = &attrValue; } else if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "offset", sizeof("offset") - 1)) != NULL) { vlvInfo.ldvlv_attrvalue = NULL; - convert_to_long_ex(tmp); - vlvInfo.ldvlv_offset = Z_LVAL_P(tmp); + vlvInfo.ldvlv_offset = zval_get_long(tmp); if ((tmp = zend_hash_str_find(Z_ARRVAL_P(val), "count", sizeof("count") - 1)) != NULL) { - convert_to_long_ex(tmp); - vlvInfo.ldvlv_count = Z_LVAL_P(tmp); + vlvInfo.ldvlv_count = zval_get_long(tmp); } else { rc = -1; php_error_docref(NULL, E_WARNING, "Count key missing from array value for VLV control"); @@ -3720,8 +3715,7 @@ int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t msgi ZVAL_COPY_VALUE(&cb_args[0], cb_link); ZVAL_STRING(&cb_args[1], url); if (call_user_function_ex(EG(function_table), NULL, &ld->rebindproc, &cb_retval, 2, cb_args, 0, NULL) == SUCCESS && !Z_ISUNDEF(cb_retval)) { - convert_to_long_ex(&cb_retval); - retval = Z_LVAL(cb_retval); + retval = zval_get_long(&cb_retval); zval_ptr_dtor(&cb_retval); } else { php_error_docref(NULL, E_WARNING, "rebind_proc PHP callback failed"); @@ -4378,8 +4372,7 @@ PHP_FUNCTION(ldap_exop_refresh) ldn.bv_val = Z_STRVAL_P(dn); ldn.bv_len = Z_STRLEN_P(dn); - convert_to_long_ex(ttl); - lttl = (ber_int_t)Z_LVAL_P(ttl); + lttl = (ber_int_t)zval_get_long(ttl); rc = ldap_refresh_s(ld->link, &ldn, lttl, &newttl, NULL, NULL); if (rc != LDAP_SUCCESS ) { diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index fbd7c9e664..e9b6d4a32c 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -3932,8 +3932,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type) mapelm = convmap; mapsize = 0; ZEND_HASH_FOREACH_VAL(target_hash, hash_entry) { - convert_to_long_ex(hash_entry); - *mapelm++ = Z_LVAL_P(hash_entry); + *mapelm++ = zval_get_long(hash_entry); mapsize++; } ZEND_HASH_FOREACH_END(); } diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index c8d8bd44f5..97660f0022 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -307,8 +307,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl obj = Z_MYSQLI_P(object); if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -342,8 +341,7 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache mysqli_prop_handler *hnd = NULL; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 19a51735ad..a3b6b76d75 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -144,8 +144,7 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql) /* 1. Here comes the error no */ entry = zend_hash_get_current_data(Z_ARRVAL(row)); - convert_to_long_ex(entry); - errno = Z_LVAL_P(entry); + errno = zval_get_long(entry); zend_hash_move_forward(Z_ARRVAL(row)); /* 2. Here comes the reason */ diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index ed14a46888..9f7773039f 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -88,7 +88,7 @@ #define GET_VER_OPT_STRING(name, str) \ if (GET_VER_OPT(name)) { convert_to_string_ex(val); str = Z_STRVAL_P(val); } #define GET_VER_OPT_LONG(name, num) \ - if (GET_VER_OPT(name)) { convert_to_long_ex(val); num = Z_LVAL_P(val); } + if (GET_VER_OPT(name)) { num = zval_get_long(val); } /* Used for peer verification in windows */ #define PHP_X509_NAME_ENTRY_TO_UTF8(ne, i, out) \ @@ -1109,8 +1109,7 @@ static void php_openssl_init_server_reneg_limit(php_stream *stream, php_openssl_ if (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "reneg_limit")) ) { - convert_to_long(val); - limit = Z_LVAL_P(val); + limit = zval_get_long(val); } /* No renegotiation rate-limiting */ @@ -1121,8 +1120,7 @@ static void php_openssl_init_server_reneg_limit(php_stream *stream, php_openssl_ if (PHP_STREAM_CONTEXT(stream) && NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "reneg_window")) ) { - convert_to_long(val); - window = Z_LVAL_P(val); + window = zval_get_long(val); } sslsock->reneg = (void*)pemalloc(sizeof(php_openssl_handshake_bucket_t), @@ -1618,11 +1616,11 @@ int php_openssl_setup_crypto(php_stream *stream, if (GET_VER_OPT("security_level")) { #ifdef HAVE_SEC_LEVEL - convert_to_long(val); - if (Z_LVAL_P(val) < 0 || Z_LVAL_P(val) > 5) { + zend_long lval = zval_get_long(val); + if (lval < 0 || lval > 5) { php_error_docref(NULL, E_WARNING, "Security level must be between 0 and 5"); } - SSL_CTX_set_security_level(sslsock->ctx, Z_LVAL_P(val)); + SSL_CTX_set_security_level(sslsock->ctx, lval); #else php_error_docref(NULL, E_WARNING, "security_level is not supported by the linked OpenSSL library " @@ -2557,8 +2555,7 @@ static zend_long php_openssl_get_crypto_method( zval *val; if (ctx && (val = php_stream_context_get_option(ctx, "ssl", "crypto_method")) != NULL) { - convert_to_long_ex(val); - crypto_method = (zend_long)Z_LVAL_P(val); + crypto_method = zval_get_long(val); crypto_method |= STREAM_CRYPTO_IS_CLIENT; } diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 3feeedf39f..1061785a53 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -458,11 +458,10 @@ static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param) return 0; } - data = *param; - if (Z_TYPE_P(param) != IS_STRING) { - zval_copy_ctor(&data); - convert_to_string(&data); + ZVAL_STR(&data, zval_get_string_func(param)); + } else { + ZVAL_COPY_VALUE(&data, param); } for (rem_cnt = Z_STRLEN(data); rem_cnt > 0; rem_cnt -= chunk_size) { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 5ff7ed471d..288b5aa44d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1335,8 +1335,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) connstring = Z_STRVAL(args[0]); } else if (ZEND_NUM_ARGS() == 2 ) { /* Safe to add conntype_option, since 2 args was illegal */ connstring = Z_STRVAL(args[0]); - convert_to_long_ex(&args[1]); - connect_type = (int)Z_LVAL(args[1]); + connect_type = (int)zval_get_long(&args[1]); } else { host = Z_STRVAL(args[0]); port = Z_STRVAL(args[1]); diff --git a/ext/posix/posix.c b/ext/posix/posix.c index bb23a5bc29..516b8f2318 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -805,8 +805,7 @@ PHP_FUNCTION(posix_ttyname) } break; default: - convert_to_long_ex(z_fd); - fd = Z_LVAL_P(z_fd); + fd = zval_get_long(z_fd); } #if defined(ZTS) && defined(HAVE_TTYNAME_R) && defined(_SC_TTY_NAME_MAX) buflen = sysconf(_SC_TTY_NAME_MAX); @@ -850,8 +849,7 @@ PHP_FUNCTION(posix_isatty) } break; default: - convert_to_long_ex(z_fd); - fd = Z_LVAL_P(z_fd); + fd = zval_get_long(z_fd); } if (isatty(fd)) { diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index ece2d0020c..6a9cf81641 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -522,9 +522,8 @@ long_dim: case IS_DOUBLE: case IS_NULL: if (Z_TYPE_P(value) != IS_STRING) { - ZVAL_COPY(&zval_copy, value); + ZVAL_STR(&zval_copy, zval_get_string_func(value)); value = &zval_copy; - convert_to_string(value); new_value = 1; } break; diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index d180a73a46..9ba0223422 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -1924,8 +1924,7 @@ zval *php_snmp_read_property(zval *object, zval *member, int type, void **cache_ obj = Z_SNMP_P(object); if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -1960,8 +1959,7 @@ void php_snmp_write_property(zval *object, zval *member, zval *value, void **cac php_snmp_prop_handler *hnd; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -2130,29 +2128,20 @@ static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval) /* {{{ */ static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval) { - zval ztmp; int ret = SUCCESS; + zend_long lval; if (Z_TYPE_P(newval) == IS_NULL) { snmp_object->max_oids = 0; return ret; } - if (Z_TYPE_P(newval) != IS_LONG) { - ztmp = *newval; - zval_copy_ctor(&ztmp); - convert_to_long(&ztmp); - newval = &ztmp; - } + lval = zval_get_long(newval); - if (Z_LVAL_P(newval) > 0) { - snmp_object->max_oids = Z_LVAL_P(newval); + if (lval > 0) { + snmp_object->max_oids = lval; } else { - php_error_docref(NULL, E_WARNING, "max_oids should be positive integer or NULL, got " ZEND_LONG_FMT, Z_LVAL_P(newval)); - } - - if (newval == &ztmp) { - zval_dtor(newval); + php_error_docref(NULL, E_WARNING, "max_oids should be positive integer or NULL, got " ZEND_LONG_FMT, lval); } return ret; @@ -2164,25 +2153,15 @@ static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *new { zval ztmp; int ret = SUCCESS; + zend_long lval = zval_get_long(newval); - if (Z_TYPE_P(newval) != IS_LONG) { - ztmp = *newval; - zval_copy_ctor(&ztmp); - convert_to_long(&ztmp); - newval = &ztmp; - } - - if (Z_LVAL_P(newval) >= 0 && Z_LVAL_P(newval) <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) { - snmp_object->valueretrieval = Z_LVAL_P(newval); + if (lval >= 0 && lval <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_OBJECT)) { + snmp_object->valueretrieval = lval; } else { php_error_docref(NULL, E_WARNING, "Unknown SNMP value retrieval method '" ZEND_LONG_FMT "'", Z_LVAL_P(newval)); ret = FAILURE; } - if (newval == &ztmp) { - zval_dtor(newval); - } - return ret; } /* }}} */ @@ -2207,32 +2186,24 @@ PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION(oid_increasing_check) /* {{{ */ static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *newval) { - zval ztmp; int ret = SUCCESS; - if (Z_TYPE_P(newval) != IS_LONG) { - ZVAL_COPY(&ztmp, newval); - convert_to_long(&ztmp); - newval = &ztmp; - } + zend_long lval = zval_get_long(newval); - switch(Z_LVAL_P(newval)) { + switch(lval) { case NETSNMP_OID_OUTPUT_SUFFIX: case NETSNMP_OID_OUTPUT_MODULE: case NETSNMP_OID_OUTPUT_FULL: case NETSNMP_OID_OUTPUT_NUMERIC: case NETSNMP_OID_OUTPUT_UCD: case NETSNMP_OID_OUTPUT_NONE: - snmp_object->oid_output_format = Z_LVAL_P(newval); + snmp_object->oid_output_format = lval; break; default: - php_error_docref(NULL, E_WARNING, "Unknown SNMP output print format '" ZEND_LONG_FMT "'", Z_LVAL_P(newval)); + php_error_docref(NULL, E_WARNING, "Unknown SNMP output print format '" ZEND_LONG_FMT "'", lval); ret = FAILURE; break; } - if (newval == &ztmp) { - zval_ptr_dtor(newval); - } return ret; } /* }}} */ @@ -2240,19 +2211,10 @@ static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval * /* {{{ */ static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval) { - zval ztmp; int ret = SUCCESS; - if (Z_TYPE_P(newval) != IS_LONG) { - ZVAL_COPY(&ztmp, newval); - convert_to_long(&ztmp); - newval = &ztmp; - } - snmp_object->exceptions_enabled = Z_LVAL_P(newval); + snmp_object->exceptions_enabled = zval_get_long(newval); - if (newval == &ztmp) { - zval_ptr_dtor(newval); - } return ret; } /* }}} */ diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index b8f1911f69..08f750bea9 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -3250,16 +3250,13 @@ sdlPtr get_sdl(zval *this_ptr, char *uri, zend_long cache_wsdl) Z_TYPE_P(proxy_host) == IS_STRING && (proxy_port = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_proxy_port", sizeof("_proxy_port")-1)) != NULL && Z_TYPE_P(proxy_port) == IS_LONG) { - zval str_port, str_proxy; + zval str_proxy; smart_str proxy = {0}; - ZVAL_DUP(&str_port, proxy_port); - convert_to_string(&str_port); smart_str_appends(&proxy,"tcp://"); smart_str_appends(&proxy,Z_STRVAL_P(proxy_host)); smart_str_appends(&proxy,":"); - smart_str_appends(&proxy,Z_STRVAL(str_port)); + smart_str_append_long(&proxy,Z_LVAL_P(proxy_port)); smart_str_0(&proxy); - zval_dtor(&str_port); ZVAL_NEW_STR(&str_proxy, proxy.s); if (!context) { diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index f963b8f343..e583ef6a02 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -940,29 +940,18 @@ PHP_FUNCTION(socket_select) /* If seconds is not set to null, build the timeval, else we wait indefinitely */ if (sec != NULL) { - zval tmp; - - if (Z_TYPE_P(sec) != IS_LONG) { - tmp = *sec; - zval_copy_ctor(&tmp); - convert_to_long(&tmp); - sec = &tmp; - } + zend_long s = zval_get_long(sec); /* Solaris + BSD do not like microsecond values which are >= 1 sec */ if (usec > 999999) { - tv.tv_sec = Z_LVAL_P(sec) + (usec / 1000000); + tv.tv_sec = s + (usec / 1000000); tv.tv_usec = usec % 1000000; } else { - tv.tv_sec = Z_LVAL_P(sec); + tv.tv_sec = s; tv.tv_usec = usec; } tv_p = &tv; - - if (sec == &tmp) { - zval_dtor(&tmp); - } } retval = select(max_fd+1, &rfds, &wfds, &efds, tv_p); diff --git a/ext/standard/info.c b/ext/standard/info.c index 5dc6b0a2a9..3d920b6461 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -235,26 +235,20 @@ static void php_print_gpcse_array(char *name, uint32_t name_length) zend_print_zval_r(tmp, 0); } } else { - ZVAL_COPY_VALUE(&tmp2, tmp); - if (Z_TYPE(tmp2) != IS_STRING) { - tmp = NULL; - zval_copy_ctor(&tmp2); - convert_to_string(&tmp2); - } + zend_string *tmp2; + zend_string *str = zval_get_tmp_string(tmp, &tmp2); if (!sapi_module.phpinfo_as_text) { - if (Z_STRLEN(tmp2) == 0) { + if (ZSTR_LEN(str) == 0) { php_info_print("<i>no value</i>"); } else { - php_info_print_html_esc(Z_STRVAL(tmp2), Z_STRLEN(tmp2)); + php_info_print_html_esc(ZSTR_VAL(str), ZSTR_LEN(str)); } } else { - php_info_print(Z_STRVAL(tmp2)); + php_info_print(ZSTR_VAL(str)); } - if (!tmp) { - zval_dtor(&tmp2); - } + zend_tmp_string_release(tmp2); } if (!sapi_module.phpinfo_as_text) { php_info_print("</td></tr>\n"); diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 8e7b95e739..613c21ac34 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -415,8 +415,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa if (pipe_requested && stream && context) { zval *blocking_pipes = php_stream_context_get_option(context, "pipe", "blocking"); if (blocking_pipes) { - convert_to_long(blocking_pipes); - php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, Z_LVAL_P(blocking_pipes), NULL); + php_stream_set_option(stream, PHP_STREAM_OPTION_PIPE_BLOCKING, zval_get_long(blocking_pipes), NULL); } } #endif diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index cff0f9c4c2..b8f318c572 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -1189,8 +1189,8 @@ done: scan_set_error_return( numVars, return_value ); result = SCAN_ERROR_EOF; } else if (numVars) { - convert_to_long(return_value ); - Z_LVAL_P(return_value) = nconversions; + zval_ptr_dtor(return_value ); + ZVAL_LONG(return_value, nconversions); } else if (nconversions < totalVars) { /* TODO: not all elements converted. we need to prune the list - cc */ } diff --git a/ext/standard/string.c b/ext/standard/string.c index 0bbff62700..1ef96e9132 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2478,7 +2478,7 @@ PHP_FUNCTION(substr_replace) if (argc > 3) { if (Z_TYPE_P(len) != IS_ARRAY) { convert_to_long_ex(len); - l = zval_get_long(len); + l = Z_LVAL_P(len); } } else { if (Z_TYPE_P(str) != IS_ARRAY) { diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 8fc76436c4..59bcc86c29 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -173,20 +173,16 @@ PHP_FUNCTION(msg_set_queue) /* now pull out members of data and set them in the stat buffer */ if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.uid", sizeof("msg_perm.uid") - 1)) != NULL) { - convert_to_long_ex(item); - stat.msg_perm.uid = Z_LVAL_P(item); + stat.msg_perm.uid = zval_get_long(item); } if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.gid", sizeof("msg_perm.gid") - 1)) != NULL) { - convert_to_long_ex(item); - stat.msg_perm.gid = Z_LVAL_P(item); + stat.msg_perm.gid = zval_get_long(item); } if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_perm.mode", sizeof("msg_perm.mode") - 1)) != NULL) { - convert_to_long_ex(item); - stat.msg_perm.mode = Z_LVAL_P(item); + stat.msg_perm.mode = zval_get_long(item); } if ((item = zend_hash_str_find(Z_ARRVAL_P(data), "msg_qbytes", sizeof("msg_qbytes") - 1)) != NULL) { - convert_to_long_ex(item); - stat.msg_qbytes = Z_LVAL_P(item); + stat.msg_qbytes = zval_get_long(item); } if (msgctl(mq->id, IPC_SET, &stat) == 0) { RETVAL_TRUE; diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 895a8152d9..63f8c968c3 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -499,9 +499,8 @@ static void TIDY_CALL php_tidy_panic(ctmbstr msg) static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value) { TidyOption opt = tidyGetOptionByName(doc, optname); - zval conv; - - ZVAL_COPY_VALUE(&conv, value); + zend_string *str, *tmp_str; + zend_long lval; if (!opt) { php_error_docref(NULL, E_NOTICE, "Unknown Tidy Configuration Option '%s'", optname); @@ -515,37 +514,24 @@ static int _php_tidy_set_tidy_opt(TidyDoc doc, char *optname, zval *value) switch(tidyOptGetType(opt)) { case TidyString: - if (Z_TYPE(conv) != IS_STRING) { - zval_copy_ctor(&conv); - convert_to_string(&conv); - } - if (tidyOptSetValue(doc, tidyOptGetId(opt), Z_STRVAL(conv))) { - if (Z_TYPE(conv) != Z_TYPE_P(value)) { - zval_dtor(&conv); - } + str = zval_get_tmp_string(value, &tmp_str); + if (tidyOptSetValue(doc, tidyOptGetId(opt), ZSTR_VAL(str))) { + zend_tmp_string_release(tmp_str); return SUCCESS; } - if (Z_TYPE(conv) != Z_TYPE_P(value)) { - zval_dtor(&conv); - } + zend_tmp_string_release(tmp_str); break; case TidyInteger: - if (Z_TYPE(conv) != IS_LONG) { - zval_copy_ctor(&conv); - convert_to_long(&conv); - } - if (tidyOptSetInt(doc, tidyOptGetId(opt), Z_LVAL(conv))) { + lval = zval_get_long(value); + if (tidyOptSetInt(doc, tidyOptGetId(opt), lval)) { return SUCCESS; } break; case TidyBoolean: - if (Z_TYPE(conv) != IS_LONG) { - zval_copy_ctor(&conv); - convert_to_long(&conv); - } - if (tidyOptSetBool(doc, tidyOptGetId(opt), Z_LVAL(conv))) { + lval = zval_get_long(value); + if (tidyOptSetBool(doc, tidyOptGetId(opt), lval)) { return SUCCESS; } break; diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 4761844f44..3db00ab22f 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -1589,20 +1589,17 @@ PHP_FUNCTION(xml_parser_set_option) switch (opt) { case PHP_XML_OPTION_CASE_FOLDING: - convert_to_long_ex(val); - parser->case_folding = Z_LVAL_P(val); + parser->case_folding = zval_get_long(val); break; case PHP_XML_OPTION_SKIP_TAGSTART: - convert_to_long_ex(val); - parser->toffset = Z_LVAL_P(val); + parser->toffset = zval_get_long(val); if (parser->toffset < 0) { php_error_docref(NULL, E_NOTICE, "tagstart ignored, because it is out of range"); parser->toffset = 0; } break; case PHP_XML_OPTION_SKIP_WHITE: - convert_to_long_ex(val); - parser->skipwhite = Z_LVAL_P(val); + parser->skipwhite = zval_get_long(val); break; case PHP_XML_OPTION_TARGET_ENCODING: { xml_encoding *enc; diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index fbec784557..490c885b23 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -125,9 +125,7 @@ zval *xmlreader_get_property_ptr_ptr(zval *object, zval *member, int type, void zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -160,9 +158,7 @@ zval *xmlreader_read_property(zval *object, zval *member, int type, void **cache zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -199,9 +195,7 @@ void xmlreader_write_property(zval *object, zval *member, zval *value, void **ca zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { - tmp_member = *member; - zval_copy_ctor(&tmp_member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index c20a059467..926aaae7e2 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -881,8 +881,7 @@ static zval *php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -915,8 +914,7 @@ static zval *php_zip_read_property(zval *object, zval *member, int type, void ** zend_object_handlers *std_hnd; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } @@ -954,8 +952,7 @@ static int php_zip_has_property(zval *object, zval *member, int type, void **cac int retval = 0; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; cache_slot = NULL; } diff --git a/main/streams/transports.c b/main/streams/transports.c index 5a73aea1c0..40d45dbd6f 100644 --- a/main/streams/transports.c +++ b/main/streams/transports.c @@ -164,13 +164,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in int backlog = 32; if (PHP_STREAM_CONTEXT(stream) && (zbacklog = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "backlog")) != NULL) { - zval *ztmp = zbacklog; - - convert_to_long_ex(ztmp); - backlog = Z_LVAL_P(ztmp); - if (ztmp != zbacklog) { - zval_ptr_dtor(ztmp); - } + backlog = zval_get_long(zbacklog); } if (0 != php_stream_xport_listen(stream, backlog, &error_text)) { |