Yasuo wrote:
> PHP does not report any errors for too many parameters for user
> defined functions, both normal function and class method :(
>
> Is PHP designed not to report error for this?
> Too many parameters for a function is obvious error and any
> language MUST report error for this, unless variable length of
> parameters is allowed. IMO

php.lang is for language documumentation. Use php-dev for this kind of
issues.

And yes, that is intended. You need it when you do you own argument
handling:
function printall()
{
    foreach (function_get_args() as $arg) {
        echo "$arg\n";
    }
}

--Jeroen


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to