Re: generate a notice for bogus function calls

From: Date: Tue, 20 Sep 2005 09:28:45 +0000
Subject: Re: generate a notice for bogus function calls
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-19103@lists.php.net to get a copy of this message
Hello Jani, Tuesday, September 20, 2005, 11:19:28 AM, you wrote: > No way. Yep no way! PHP doesn't offer a '...' signature so we need it the way it is. And i don't think we want to have those '...' signatures. marcus > On Mon, 19 Sep 2005, Nuno Lopes wrote: >> >> Hi, >> >> Although this is not as hot as references or Unicode stuff, I would like to >> discuss a new topic. >> Currently PHP accepts more parameters to a function than the required. >> In English: >> <? >> 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 behaviour has already beaten me for a couple of times, because I had a >> program with functions with similar names, but with different number of >> parameters. The result for calling the wrong function? A nice infinite loop :) >> >> I hope this is not hard to implement (maybe in the parser, to get the errors >> on compile time - for performance). >> >> Regards, >> Nuno >> > -- > Donate @ <http://pecl.php.net/wishlist.php/sniper> > Disclaimer: Donating money may make me happier and friendlier for a limited period! Best regards, Marcus

« previous php.internals (#19103) next »