Re: generate a notice for bogus function calls
| From: | Thorsten Suckow-Homberg | Date: | Mon, 19 Sep 2005 21:34:22 +0000 |
| Subject: | Re: generate a notice for bogus function calls | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19094@lists.php.net to get a copy of this message | ||
> <?
> function a($b) {}
> a(1,2,3);
> ?>
>
> PHP accepts this and generates no errors. My purpose is to start
> generating an E_NOTICE, just like we do for not yet initialized variables.
This would break BC (btw a hot topic nowadays, too ;) ) so this is not a
good idea. Also it makes no sense in an oo-driven environment as long as
there is no way of overloading methods.
Best way to deal with this is to write gateway methods that delegate to the
appropriate methods based on the passed in parameters.