Bug #13892: too many number of parameters

From: Date: Thu, 01 Nov 2001 00:09:46 +0000
Subject: Bug #13892: too many number of parameters
Groups: php.dev 
Request: Send a blank email to php-dev+get-69439@lists.php.net to get a copy of this message
From:             yasuo_ohgaki@yahoo.com
Operating system: any
PHP version:      4.0.6
PHP Bug Type:     Feature/Change Request
Bug description:  too many number of parameters

Currently, it seems PHP is designed NOT to report errors for too many
paramaters for user defined functions.

"..." for variable length paramters. Raise error without "...", for
example.

function foo($var1, $var2, ...)

assert(count(function_get_args()) <= 3);
or like can be used to check num of paramters, but module functions checks
num of parameters. User functions are better to behave the same way by
default. IMHO.
-- 
Edit bug report at: http://bugs.php.net/?id=13892&edit=1



Thread (5 messages)

« previous php.dev (#69439) next »