#23804 [WFx]: passing wrong parameter count to user functions gives no warnings

From: Date: Mon, 26 May 2003 18:30:23 +0000
Subject: #23804 [WFx]: passing wrong parameter count to user functions gives no warnings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-40455@lists.php.net to get a copy of this message
ID: 23804 User updated by: meebey@php.net Reported By: meebey@php.net Status: Wont fix Bug Type: Scripting Engine problem Operating System: Debian GNU/Linux PHP Version: 4.3.1 New Comment: but this change, which could be an option in php.ini strict_function_overload = (on|off) would allow cleaner programming... overloading with foo(...) should be of course still possible and the paremters accessed through func_get_args(). Previous Comments: ------------------------------------------------------------------------ [2003-05-26 04:30:37] derick@php.net There is no *good* reason to do it, only two reasons *not* to do it. Why break BC with PHP 5 if you don't have to? ------------------------------------------------------------------------ [2003-05-26 04:22:09] meebey@php.net I agree with the BC.... what about doing this in ZE2 then? ------------------------------------------------------------------------ [2003-05-26 04:11:45] derick@php.net This can not be implemented because: 1. it breaks BC 2. it renders func_get_args() totally useles. no warning, no nothing; it's fine as-is ------------------------------------------------------------------------ [2003-05-26 04:08:15] meebey@php.net if not error than at least a warning... It's very confusing when APIs in PHP programs change and after searching for hours, the problem is found which is a function call with too much parameters. I always exspected that PHP will give a warning like I get them with the C functions. Also it's bad programming, ignoring this kind of error is not good. ------------------------------------------------------------------------ [2003-05-25 21:30:40] sniper@php.net There's nothing to fix here, more is broken if some error is added.. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23804 -- Edit this bug report at http://bugs.php.net/?id=23804&edit=1

« previous php.bugs (#40455) next »