cvs: ZendEngine2 / zend_compile.c /tests bug29104.phpt

From: Date: Wed, 27 Apr 2005 13:30:54 +0000
Subject: cvs: ZendEngine2 / zend_compile.c /tests bug29104.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3602@lists.php.net to get a copy of this message
dmitry Wed Apr 27 09:30:54 2005 EDT Added files: /ZendEngine2/tests bug29104.phpt Modified files: /ZendEngine2 zend_compile.c Log: Fixed bug #29104 (Function declaration in method doesn't work) http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.621&r2=1.622&ty=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.621 ZendEngine2/zend_compile.c:1.622 --- ZendEngine2/zend_compile.c:1.621 Tue Apr 26 04:48:22 2005 +++ ZendEngine2/zend_compile.c Wed Apr 27 09:30:53 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.621 2005/04/26 08:48:22 dmitry Exp $ */ +/* $Id: zend_compile.c,v 1.622 2005/04/27 13:30:53 dmitry Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -1039,7 +1039,7 @@ op_array.fn_flags = fn_flags; op_array.pass_rest_by_reference = 0; - op_array.scope = CG(active_class_entry); + op_array.scope = is_method?CG(active_class_entry):NULL; op_array.prototype = NULL; op_array.line_start = zend_get_compiled_lineno(TSRMLS_C); http://cvs.php.net/co.php/ZendEngine2/tests/bug29104.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug29104.phpt +++ ZendEngine2/tests/bug29104.phpt --TEST-- Bug #29104 Function declaration in method doesn't work --FILE-- <?php class A { function g() { echo "function g - begin\n"; function f() { echo "function f\n"; } echo "function g - end\n"; } } $a = new A; $a->g(); f(); ?> --EXPECT-- function g - begin function g - end function f

« previous php.zend-engine.cvs (#3602) next »