summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-09-29 21:49:22 +0800
committerXinchen Hui <laruence@gmail.com>2015-09-29 21:50:15 +0800
commitdf2ff75116dc96d542aa7631028b09954faa4fea (patch)
tree56d83c28280298dbfdfa5add3d5038e131080334 /Zend/zend_compile.c
parent27d4d32e6bd4c6ff2f65d162e9478671348764f4 (diff)
downloadphp-git-df2ff75116dc96d542aa7631028b09954faa4fea.tar.gz
Make ZEND_ECHO and removed ZEND_PRINT distinguishable
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8e9f5414dd..4886fcc57e 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3612,12 +3612,14 @@ void zend_compile_return(zend_ast *ast) /* {{{ */
void zend_compile_echo(zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = ZEND_ECHO;
}
/* }}} */
@@ -6214,12 +6216,14 @@ void zend_compile_coalesce(znode *result, zend_ast *ast) /* {{{ */
void zend_compile_print(znode *result, zend_ast *ast) /* {{{ */
{
+ zend_op *opline;
zend_ast *expr_ast = ast->child[0];
znode expr_node;
zend_compile_expr(&expr_node, expr_ast);
- zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline = zend_emit_op(NULL, ZEND_ECHO, &expr_node, NULL);
+ opline->extended_value = ZEND_PRINT;
result->op_type = IS_CONST;
ZVAL_LONG(&result->u.constant, 1);