cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests 022.phpt

From: Date: Sat, 01 Mar 2008 13:53:32 +0000
Subject: cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests 022.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6459@lists.php.net to get a copy of this message
johannes Sat Mar 1 13:53:32 2008 UTC Added files: (Branch: PHP_5_3) /ZendEngine2/tests 022.phpt Modified files: /ZendEngine2 zend_compile.c Log: MFH: Allow implementation of abstract methods with optional parameters (Christian Schneider) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.44&r2=1.647.2.27.2.41.2.45&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.44 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.45 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.44 Sat Feb 23 17:06:19 2008 +++ ZendEngine2/zend_compile.c Sat Mar 1 13:53:32 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.44 2008/02/23 17:06:19 helly Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.45 2008/03/01 13:53:32 johannes Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -2283,7 +2283,7 @@ } /* check number of arguments */ - if (proto->common.required_num_args != fe->common.required_num_args + if (proto->common.required_num_args < fe->common.required_num_args || proto->common.num_args > fe->common.num_args) { return 0; } http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/022.phpt?view=markup&rev=1.1 Index: ZendEngine2/tests/022.phpt +++ ZendEngine2/tests/022.phpt --TEST-- Implementating abstracting methods and optional parameters --FILE-- <?php abstract class Base { abstract function someMethod($param); } class Ext extends Base { function someMethod($param = "default") { echo $param, "\n"; } } $a = new Ext(); $a->someMethod("foo"); $a->someMethod(); --EXPECT-- foo default

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