From: Bob Weinand Date: Fri, 31 Jul 2015 00:44:42 +0000 (+0200) Subject: Implicit return should be always on the last line of a function X-Git-Tag: php-7.0.0beta3~5^2~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac87657d4219111ecc52f2b6f27f5a739f0379a3;p=php Implicit return should be always on the last line of a function --- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f6d9e52777..5d7eec2412 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4848,6 +4848,9 @@ void zend_compile_func_decl(znode *result, zend_ast *ast) /* {{{ */ CG(active_class_entry), (zend_function *) op_array, E_COMPILE_ERROR); } + /* put the implicit return on the really last line */ + CG(zend_lineno) = decl->end_lineno; + zend_do_extended_info(); zend_emit_final_return(NULL);