Index: Zend/zend_compile.c =================================================================== RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.832 diff -u -r1.832 zend_compile.c --- Zend/zend_compile.c 25 Jul 2008 04:54:56 -0000 1.832 +++ Zend/zend_compile.c 25 Jul 2008 10:25:46 -0000 @@ -1078,20 +1078,6 @@ } /* }}} */ -void zend_do_init_string(znode *result TSRMLS_DC) /* {{{ */ -{ - zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - - opline->opcode = ZEND_INIT_STRING; - opline->result.op_type = IS_TMP_VAR; - opline->result.u.var = get_temporary_variable(CG(active_op_array)); - opline->extended_value = CG(literal_type); - *result = opline->result; - SET_UNUSED(opline->op1); - SET_UNUSED(opline->op2); -} -/* }}} */ - void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ { zend_op *opline; @@ -1111,48 +1097,38 @@ efree(Z_UNIVAL(op2->u.constant).v); return; } - opline->op1 = *op1; + + if (op1) { + opline->result = *result; + opline->op1 = *op1; + } else { + opline->result.op_type = IS_TMP_VAR; + opline->result.u.var = get_temporary_variable(CG(active_op_array)); + opline->extended_value = CG(literal_type); + *result = opline->result; + SET_UNUSED(opline->op1); + } opline->op2 = *op2; - opline->op2.op_type = IS_CONST; - opline->result = opline->op1; - *result = opline->result; } /* }}} */ void zend_do_add_variable(znode *result, znode *op1, znode *op2 TSRMLS_DC) /* {{{ */ { - zend_op *opline; + zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - if (op1->op_type == IS_CONST) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); - opline->opcode = ZEND_INIT_STRING; + opline->opcode = ZEND_ADD_VAR; + + if (op1) { + opline->result = *result; + opline->op1 = *op1; + } else { opline->result.op_type = IS_TMP_VAR; opline->result.u.var = get_temporary_variable(CG(active_op_array)); *result = opline->result; SET_UNUSED(opline->op1); - SET_UNUSED(opline->op2); - - if (Z_STRLEN(op1->u.constant)>0) { - opline = get_next_op(CG(active_op_array) TSRMLS_CC); - opline->opcode = ZEND_ADD_STRING; - opline->result = *result; - opline->op1 = *result; - opline->op2 = *op1; - opline->result = opline->op1; - } else { - zval_dtor(&op1->u.constant); - } - } else { - *result = *op1; } - - opline = get_next_op(CG(active_op_array) TSRMLS_CC); - opline->opcode = ZEND_ADD_VAR; - opline->result = *result; - opline->op1 = *result; opline->op2 = *op2; opline->extended_value = CG(literal_type); - *result = opline->result; } /* }}} */ @@ -4168,6 +4144,7 @@ zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); switch (cmd->op_type) { + case IS_CONST: case IS_TMP_VAR: opline->opcode = ZEND_SEND_VAL; break; @@ -5153,7 +5130,6 @@ retval = T_ECHO; break; case T_END_HEREDOC: - case T_END_NOWDOC: efree(Z_STRVAL(zendlval->u.constant)); break; } Index: Zend/zend_compile.h =================================================================== RCS file: /repository/ZendEngine2/zend_compile.h,v retrieving revision 1.384 diff -u -r1.384 zend_compile.h --- Zend/zend_compile.h 25 Jul 2008 04:54:56 -0000 1.384 +++ Zend/zend_compile.h 25 Jul 2008 10:25:46 -0000 @@ -420,7 +420,6 @@ void zend_do_free(znode *op1 TSRMLS_DC); -void zend_do_init_string(znode *result TSRMLS_DC); void zend_do_add_string(znode *result, znode *op1, znode *op2 TSRMLS_DC); void zend_do_add_variable(znode *result, znode *op1, znode *op2 TSRMLS_DC); Index: Zend/zend_highlight.c =================================================================== RCS file: /repository/ZendEngine2/zend_highlight.c,v retrieving revision 1.63 diff -u -r1.63 zend_highlight.c --- Zend/zend_highlight.c 26 Mar 2008 14:23:01 -0000 1.63 +++ Zend/zend_highlight.c 1 May 2008 11:00:31 -0000 @@ -77,7 +77,6 @@ int token_type; char *last_color = syntax_highlighter_ini->highlight_html; char *next_color; - int in_string=0; CG(literal_type) = IS_STRING; zend_printf(""); @@ -100,12 +99,10 @@ case T_CLOSE_TAG: next_color = syntax_highlighter_ini->highlight_default; break; - case T_CONSTANT_ENCAPSED_STRING: - next_color = syntax_highlighter_ini->highlight_string; - break; case '"': + case T_ENCAPSED_AND_WHITESPACE: + case T_CONSTANT_ENCAPSED_STRING: next_color = syntax_highlighter_ini->highlight_string; - in_string = !in_string; break; case T_WHITESPACE: zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */ @@ -113,9 +110,7 @@ continue; break; default: - if (in_string) { - next_color = syntax_highlighter_ini->highlight_string; - } else if (Z_TYPE(token) == 0) { + if (Z_TYPE(token) == 0) { next_color = syntax_highlighter_ini->highlight_keyword; } else { next_color = syntax_highlighter_ini->highlight_default; @@ -134,7 +129,6 @@ } switch (token_type) { case T_END_HEREDOC: - case T_END_NOWDOC: zend_html_puts(Z_STRVAL(token), Z_STRLEN(token) TSRMLS_CC); break; default: @@ -156,7 +150,7 @@ efree(Z_UNIVAL(token).v); break; } - } else if (token_type == T_END_HEREDOC || token_type == T_END_NOWDOC) { + } else if (token_type == T_END_HEREDOC) { efree(Z_UNIVAL(token).v); } Z_TYPE(token) = 0; @@ -204,11 +198,7 @@ Z_TYPE(token) = 0; continue; - case EOF: - return; - case T_END_HEREDOC: - case T_END_NOWDOC: zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng)); efree(Z_STRVAL(token)); /* read the following character, either newline or ; */ Index: Zend/zend_language_parser.y =================================================================== RCS file: /repository/ZendEngine2/zend_language_parser.y,v retrieving revision 1.208 diff -u -r1.208 zend_language_parser.y --- Zend/zend_language_parser.y 24 Jul 2008 11:48:30 -0000 1.208 +++ Zend/zend_language_parser.y 25 Jul 2008 13:15:00 -0000 @@ -23,7 +23,7 @@ /* * LALR shift/reduce conflicts and how they are resolved: * - * - 2 shift/reduce conflicts due to the dangeling elseif/else ambiguity. Solved by shift. + * - 2 shift/reduce conflicts due to the dangling elseif/else ambiguity. Solved by shift. * */ @@ -149,8 +149,6 @@ %token T_NAMESPACE %token T_NS_C %token T_DIR -%token T_START_NOWDOC -%token T_END_NOWDOC %% /* Rules */ @@ -645,7 +643,7 @@ | '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; } | scalar { $$ = $1; } | T_ARRAY '(' array_pair_list ')' { $$ = $3; } - | '`' { CG(literal_type) = UG(unicode)?IS_UNICODE:IS_STRING; } encaps_list '`' { zend_do_shell_exec(&$$, &$3 TSRMLS_CC); } + | '`' { CG(literal_type) = UG(unicode)?IS_UNICODE:IS_STRING; } backticks_expr '`' { zend_do_shell_exec(&$$, &$3 TSRMLS_CC); } | T_PRINT expr { zend_do_print(&$$, &$2 TSRMLS_CC); } | function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type, 0 TSRMLS_CC); } parameter_list ')' lexical_vars '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); $$ = $4; } @@ -739,6 +737,12 @@ | '(' expr ')' { $$ = $2; } ; +backticks_expr: + /* empty */ { ZVAL_EMPTY_TEXT(&$$.u.constant); INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; } + | T_ENCAPSED_AND_WHITESPACE { $$ = $1; } + | encaps_list { $$ = $1; } +; + ctor_arguments: /* empty */ { Z_LVAL($$.u.constant)=0; } @@ -757,7 +761,13 @@ | T_METHOD_C { $$ = $1; } | T_FUNC_C { $$ = $1; } | T_NS_C { $$ = $1; } - | T_START_NOWDOC T_ENCAPSED_AND_WHITESPACE T_END_NOWDOC { $$ = $2; } + | start_heredoc T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC { $$ = $2; } + | start_heredoc T_END_HEREDOC { if (CG(literal_type) == IS_UNICODE) { ZVAL_EMPTY_UNICODE(&$$.u.constant); } else { ZVAL_EMPTY_STRING(&$$.u.constant); } INIT_PZVAL(&$$.u.constant); $$.op_type = IS_CONST; } +; + +start_heredoc: + T_START_HEREDOC { CG(literal_type) = UG(unicode)?IS_UNICODE:IS_STRING; } + | T_BINARY_HEREDOC { CG(literal_type) = IS_STRING; } ; @@ -782,9 +792,8 @@ | class_constant { $$ = $1; } | common_scalar { $$ = $1; } | '"' { CG(literal_type) = UG(unicode)?IS_UNICODE:IS_STRING; } encaps_list '"' { $$ = $3; } - | T_START_HEREDOC { CG(literal_type) = UG(unicode)?IS_UNICODE:IS_STRING; } encaps_list T_END_HEREDOC { $$ = $3; } | T_BINARY_DOUBLE { CG(literal_type) = IS_STRING; } encaps_list '"' { $$ = $3; } - | T_BINARY_HEREDOC { CG(literal_type) = IS_STRING; } encaps_list T_END_HEREDOC { $$ = $3; } + | start_heredoc encaps_list T_END_HEREDOC { $$ = $2; } ; @@ -947,8 +956,8 @@ encaps_list: encaps_list encaps_var { zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, &$1, &$2 TSRMLS_CC); } | encaps_list T_ENCAPSED_AND_WHITESPACE { zend_do_add_string(&$$, &$1, &$2 TSRMLS_CC); } - | /* empty */ { zend_do_init_string(&$$ TSRMLS_CC); } - + | encaps_var { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, NULL, &$1 TSRMLS_CC); } + | T_ENCAPSED_AND_WHITESPACE encaps_var { zend_do_add_string(&$$, NULL, &$1 TSRMLS_CC); zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&$$, &$$, &$2 TSRMLS_CC); } ; Index: Zend/zend_language_scanner.l =================================================================== RCS file: /repository/ZendEngine2/zend_language_scanner.l,v retrieving revision 1.188 diff -u -r1.188 zend_language_scanner.l --- Zend/zend_language_scanner.l 8 Jul 2008 15:24:25 -0000 1.188 +++ Zend/zend_language_scanner.l 9 Jul 2008 11:04:04 -0000 @@ -1420,7 +1420,7 @@ BACKQUOTE_CHARS ("{"*([^$`\\{]|("\\"{ANY_CHAR}))|{BACKQUOTE_LITERAL_DOLLAR}) HEREDOC_CHARS ("{"*([^$\n\r\\{]|("\\"[^\n\r]))|{HEREDOC_LITERAL_DOLLAR}|({HEREDOC_NEWLINE}+({HEREDOC_NON_LABEL}|{HEREDOC_LABEL_NO_NEWLINE}))) -NOWDOC_CHARS ({NEWLINE}*(([^a-zA-Z_\x7f-\xff\n\r][^\n\r]*)|({LABEL}[^a-zA-Z0-9_\x7f-\xff;\n\r][^\n\r]*)|({LABEL}[;][^\n\r]+))) +NOWDOC_CHARS ([^\n\r]|{NEWLINE}+([^a-zA-Z_\x7f-\xff\n\r]|({LABEL}([^a-zA-Z0-9_\x7f-\xff;\n\r]|(";"[^\n\r]))))) /* compute yyleng before each rule */ := yyleng = YYCURSOR - SCNG(yy_text); @@ -2423,45 +2423,48 @@ return T_BINARY_DOUBLE; } -b"<<<"{TABS_AND_SPACES}({LABEL}|["]{LABEL}["]){NEWLINE} { +b?"<<<"{TABS_AND_SPACES}({LABEL}|([']{LABEL}['])|(["]{LABEL}["])){NEWLINE} { char *s; + int bprefix = (yytext[0] != '<') ? 1 : 0; CG(zend_lineno)++; - CG(heredoc_len) = yyleng-4-1-(yytext[yyleng-2]=='\r'?1:0); - s = yytext+4; + CG(heredoc_len) = yyleng-bprefix-3-1-(yytext[yyleng-2]=='\r'?1:0); + s = yytext+bprefix+3; while ((*s == ' ') || (*s == '\t')) { s++; CG(heredoc_len)--; } - if (*s == '"') { + if (*s == '\'') { s++; CG(heredoc_len) -= 2; + + BEGIN(ST_NOWDOC); + } else { + if (*s == '"') { + s++; + CG(heredoc_len) -= 2; + } + + BEGIN(ST_HEREDOC); } + CG(heredoc) = estrndup(s, CG(heredoc_len)); - BEGIN(ST_START_HEREDOC); - return T_BINARY_HEREDOC; -} + /* Check for ending label on the next line */ + if (CG(heredoc_len) < YYLIMIT - YYCURSOR && !memcmp(YYCURSOR, s, CG(heredoc_len))) { + char *end = YYCURSOR + CG(heredoc_len); -"<<<"{TABS_AND_SPACES}({LABEL}|["]{LABEL}["]){NEWLINE} { - char *s; + if (*end == ';') { + end++; + } - CG(zend_lineno)++; - CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0); - s = yytext+3; - while ((*s == ' ') || (*s == '\t')) { - s++; - CG(heredoc_len)--; + if (*end == '\n' || *end == '\r') { + BEGIN(ST_END_HEREDOC); + } } - if (*s == '"') { - s++; - CG(heredoc_len) -= 2; - } - CG(heredoc) = estrndup(s, CG(heredoc_len)); - BEGIN(ST_START_HEREDOC); - return T_START_HEREDOC; + return bprefix ? T_BINARY_HEREDOC : T_START_HEREDOC; } @@ -2471,34 +2474,6 @@ } -{ANY_CHAR} { - yyless(0); - BEGIN(ST_HEREDOC); - goto restart; -} - -{LABEL}";"?[\n\r] { - int label_len = yyleng - 1; - - if (yytext[label_len-1]==';') { - label_len--; - } - - yyless(label_len); - - if (label_len==CG(heredoc_len) && !memcmp(yytext, CG(heredoc), label_len)) { - Z_STRVAL_P(zendlval) = CG(heredoc); - Z_STRLEN_P(zendlval) = label_len; - CG(heredoc)=NULL; - CG(heredoc_len)=0; - BEGIN(ST_IN_SCRIPTING); - return T_END_HEREDOC; - } else { - BEGIN(ST_HEREDOC); - yymore(); - } -} - /* Match everything up to and including a possible ending label, so if the label * doesn't match, it's kept with the rest of the string * @@ -2526,12 +2501,9 @@ len--; /* Windows newline */ } - /* Go back before last label char, to match in ST_END_HEREDOC state */ - yyless(yyleng - 2); - - /* Subtract the remaining label length. yyleng must include newline - * before label, for zend_highlight/strip, tokenizer, etc. */ - yyleng -= CG(heredoc_len) - 1; + /* Go back before label, to match in ST_END_HEREDOC state. yytext will include + * newline before label, for zend_highlight/strip, tokenizer, etc. */ + yyless(yyleng - CG(heredoc_len) - 1); /* 1 for newline after label */ CG(increment_lineno) = 1; /* For newline before label */ BEGIN(ST_END_HEREDOC); @@ -2551,8 +2523,11 @@ } {ANY_CHAR} { - SCNG(yy_text) = Z_STRVAL_P(zendlval) = CG(heredoc); - SCNG(yy_leng) = Z_STRLEN_P(zendlval) = CG(heredoc_len); + YYCURSOR += CG(heredoc_len) - 1; + yyleng = CG(heredoc_len); + + Z_STRVAL_P(zendlval) = CG(heredoc); + Z_STRLEN_P(zendlval) = CG(heredoc_len); CG(heredoc) = NULL; CG(heredoc_len) = 0; BEGIN(ST_IN_SCRIPTING); @@ -2644,58 +2619,7 @@ } -/* BEGIN nowdoc */ - -b?"<<<"{TABS_AND_SPACES}[']{LABEL}[']{NEWLINE} { - int bprefix = (yytext[0] != '<') ? 1 : 0; - char *s; - CG(zend_lineno)++; - /* 3 is <<<, 2 is quotes, 1 is newline */ - CG(heredoc_len) = yyleng-bprefix-3-2-1-(yytext[yyleng-2]=='\r'?1:0); - s = yytext+bprefix+3; - while ((*s == ' ') || (*s == '\t')) { - s++; - CG(heredoc_len)--; - } - s++; /* first quote */ - CG(heredoc) = estrndup(s, CG(heredoc_len)); - - CG(literal_type) = bprefix?IS_STRING:ZEND_STR_TYPE; - BEGIN(ST_START_NOWDOC); - return T_START_NOWDOC; -} - -{ANY_CHAR} { - yyless(0); - BEGIN(ST_NOWDOC); - goto restart; -} - -{LABEL}";"?[\r\n] { - int label_len = yyleng - 1; - - if (yytext[label_len-1]==';') { - label_len--; - } - - if (label_len==CG(heredoc_len) && !memcmp(yytext, CG(heredoc), label_len)) { - yyless(label_len-1); - yyleng = 0; - BEGIN(ST_END_NOWDOC); - if (CG(literal_type) == IS_UNICODE) { - ZVAL_EMPTY_UNICODE(zendlval); - } else { - ZVAL_EMPTY_STRING(zendlval); - } - return T_ENCAPSED_AND_WHITESPACE; - } else { - BEGIN(ST_NOWDOC); - yyless(label_len); - yymore(); - } -} - -{NOWDOC_CHARS}*{NEWLINE}+{LABEL}";"?[\n\r] { +({NOWDOC_CHARS}+{NEWLINE}+|{NEWLINE}+){LABEL}";"?[\n\r] { char *end = yytext + yyleng - 1; if (end[-1] == ';') { @@ -2716,20 +2640,17 @@ len--; /* Windows newline */ } - /* Go back before last label char, to match in ST_END_NOWDOC state */ - yyless(yyleng - 2); - - /* Subtract the remaining label length. yyleng must include newline - * before label, for zend_highlight/strip, tokenizer, etc. */ - yyleng -= CG(heredoc_len) - 1; + /* Go back before label, to match in ST_END_HEREDOC state. yytext will include + * newline before label, for zend_highlight/strip, tokenizer, etc. */ + yyless(yyleng - CG(heredoc_len) - 1); /* 1 for newline after label */ CG(increment_lineno) = 1; /* For newline before label */ - BEGIN(ST_END_NOWDOC); + BEGIN(ST_END_HEREDOC); - HANDLE_NEWLINES(yytext, len); if (!zend_copy_scanner_string(zendlval, yytext, len, CG(literal_type), SCNG(output_conv) TSRMLS_CC)) { return 0; } + HANDLE_NEWLINES(yytext, len); return T_ENCAPSED_AND_WHITESPACE; } else { /* Go back to end of label, so the next match works correctly in case of @@ -2739,16 +2660,6 @@ } } -{ANY_CHAR} { - SCNG(yy_text) = Z_STRVAL_P(zendlval) = CG(heredoc); - SCNG(yy_leng) = Z_STRLEN_P(zendlval) = CG(heredoc_len); - CG(heredoc) = NULL; - CG(heredoc_len) = 0; - BEGIN(ST_IN_SCRIPTING); - return T_END_NOWDOC; -} - -/* END nowdoc */ ["] { BEGIN(ST_IN_SCRIPTING); Index: Zend/zend_vm_def.h =================================================================== RCS file: /repository/ZendEngine2/zend_vm_def.h,v retrieving revision 1.236 diff -u -r1.236 zend_vm_def.h --- Zend/zend_vm_def.h 24 Jul 2008 11:48:30 -0000 1.236 +++ Zend/zend_vm_def.h 25 Jul 2008 13:38:40 -0000 @@ -1824,38 +1824,64 @@ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(54, ZEND_ADD_CHAR, TMP, CONST) +ZEND_VM_HANDLER(54, ZEND_ADD_CHAR, TMP|UNUSED, CONST) { zend_op *opline = EX(opline); - zend_free_op free_op1; + zval *str = &EX_T(opline->result.u.var).tmp_var; + + if (OP1_TYPE == IS_UNUSED) { + /* Initialize for erealloc in add_char_to_string */ + Z_UNIVAL_P(str).v = NULL; + Z_UNILEN_P(str) = 0; + Z_TYPE_P(str) = opline->extended_value; + + INIT_PZVAL(str); + } + + add_char_to_string(str, str, &opline->op2.u.constant); - add_char_to_string(&EX_T(opline->result.u.var).tmp_var, - GET_OP1_ZVAL_PTR(BP_VAR_NA), - &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(55, ZEND_ADD_STRING, TMP, CONST) +ZEND_VM_HANDLER(55, ZEND_ADD_STRING, TMP|UNUSED, CONST) { zend_op *opline = EX(opline); - zend_free_op free_op1; + zval *str = &EX_T(opline->result.u.var).tmp_var; + + if (OP1_TYPE == IS_UNUSED) { + /* Initialize for erealloc in add_string_to_string */ + Z_UNIVAL_P(str).v = NULL; + Z_UNILEN_P(str) = 0; + Z_TYPE_P(str) = opline->extended_value; + + INIT_PZVAL(str); + } + + add_string_to_string(str, str, &opline->op2.u.constant); - add_string_to_string(&EX_T(opline->result.u.var).tmp_var, - GET_OP1_ZVAL_PTR(BP_VAR_NA), - &opline->op2.u.constant); /* FREE_OP is missing intentionally here - we're always working on the same temporary variable */ ZEND_VM_NEXT_OPCODE(); } -ZEND_VM_HANDLER(56, ZEND_ADD_VAR, TMP, TMP|VAR|CV) +ZEND_VM_HANDLER(56, ZEND_ADD_VAR, TMP|UNUSED, TMP|VAR|CV) { zend_op *opline = EX(opline); - zend_free_op free_op1, free_op2; + zend_free_op free_op2; + zval *str = &EX_T(opline->result.u.var).tmp_var; zval *var = GET_OP2_ZVAL_PTR(BP_VAR_R); zval var_copy; int use_copy = 0; + if (OP1_TYPE == IS_UNUSED) { + /* Initialize for erealloc in add_string_to_string */ + Z_UNIVAL_P(str).v = NULL; + Z_UNILEN_P(str) = 0; + Z_TYPE_P(str) = opline->extended_value; + + INIT_PZVAL(str); + } + if (Z_TYPE_P(var) != opline->extended_value) { if (opline->extended_value == IS_UNICODE) { zend_make_unicode_zval(var, &var_copy, &use_copy); @@ -1867,8 +1893,8 @@ var = &var_copy; } } - add_string_to_string(&EX_T(opline->result.u.var).tmp_var, - GET_OP1_ZVAL_PTR(BP_VAR_NA), var); + add_string_to_string(str, str, var); + if (use_copy) { zval_dtor(var); } Index: Zend/tests/bug35655.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/bug35655.phpt,v retrieving revision 1.5 diff -u -r1.5 bug35655.phpt --- Zend/tests/bug35655.phpt 26 Apr 2007 09:39:30 -0000 1.5 +++ Zend/tests/bug35655.phpt 2 May 2008 13:50:01 -0000 @@ -19,6 +19,6 @@ ?> --EXPECT-- -
<?php
  $x 
= <<<EOT
some string    
EOT
  
$y 2;
?> +
<?php
  $x 
= <<<EOT
some string    
EOT
  
$y 2;
?>
Index: Zend/tests/heredoc_011.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/heredoc_011.phpt,v retrieving revision 1.3 diff -u -r1.3 heredoc_011.phpt --- Zend/tests/heredoc_011.phpt 26 May 2008 14:33:43 -0000 1.3 +++ Zend/tests/heredoc_011.phpt 23 Jun 2008 09:06:40 -0000 @@ -1,5 +1,5 @@ --TEST-- -Heredocs can NOT be used as static scalars. +STATIC heredocs CAN be used as static scalars. --FILE-- ---EXPECTF-- -Parse error: parse error in %sheredoc_011.php on line %d +--EXPECT-- +If you DON'T see this, something's wrong. Index: Zend/tests/nowdoc_013.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/nowdoc_013.phpt,v retrieving revision 1.2 diff -u -r1.2 nowdoc_013.phpt --- Zend/tests/nowdoc_013.phpt 12 Feb 2008 09:28:17 -0000 1.2 +++ Zend/tests/nowdoc_013.phpt 2 May 2008 13:25:20 -0000 @@ -21,6 +21,6 @@ ?> --EXPECT-- -<?php
  $x 
= <<<'EOT'
some string    
EOT
  
$y 2;
?> +<?php
  $x 
= <<<'EOT'
some string    
EOT
  
$y 2;
?>
Index: Zend/tests/nowdoc_014.phpt =================================================================== RCS file: /repository/ZendEngine2/tests/nowdoc_014.phpt,v retrieving revision 1.2 diff -u -r1.2 nowdoc_014.phpt --- Zend/tests/nowdoc_014.phpt 12 Feb 2008 09:28:17 -0000 1.2 +++ Zend/tests/nowdoc_014.phpt 2 May 2008 13:32:01 -0000 @@ -1,5 +1,5 @@ --TEST-- -Highliting empty nowdoc +Highlighting empty nowdoc --INI-- highlight.string = #DD0000 highlight.comment = #FF8000 @@ -20,6 +20,6 @@ ?> --EXPECT-- -<?php
  $x 
= <<<'EOT'
EOT
  
$y 2;
?> +<?php
  $x 
= <<<'EOT'
EOT
  
$y 2;
?>
Index: ext/tokenizer/tokenizer.c =================================================================== RCS file: /repository/php-src/ext/tokenizer/tokenizer.c,v retrieving revision 1.50 diff -u -r1.50 tokenizer.c --- ext/tokenizer/tokenizer.c 25 Jul 2008 03:41:38 -0000 1.50 +++ ext/tokenizer/tokenizer.c 25 Jul 2008 10:25:21 -0000 @@ -134,7 +134,7 @@ MAKE_STD_ZVAL(keyword); array_init(keyword); add_next_index_long(keyword, token_type); - if (token_type == T_END_HEREDOC || token_type == T_END_NOWDOC) { + if (token_type == T_END_HEREDOC) { if (CG(increment_lineno)) { token_line = ++CG(zend_lineno); CG(increment_lineno) = 0; Index: tests/strings/bug26703.phpt =================================================================== RCS file: /repository/php-src/tests/strings/bug26703.phpt,v retrieving revision 1.4 diff -u -r1.4 bug26703.phpt --- tests/strings/bug26703.phpt 26 Apr 2007 09:39:03 -0000 1.4 +++ tests/strings/bug26703.phpt 2 May 2008 14:00:10 -0000 @@ -12,6 +12,6 @@ ?> --EXPECT-- -<?php echo "foo[] $a \n"?> +<?php echo "foo[] $a \n"?>