Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34588 invoked by uid 1010); 20 Sep 2005 09:19:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34572 invoked from network); 20 Sep 2005 09:19:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Sep 2005 09:19:29 -0000 X-Host-Fingerprint: 195.197.172.116 gw02.mail.saunalahti.fi Linux 2.4/2.6 Received: from ([195.197.172.116:58905] helo=gw02.mail.saunalahti.fi) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BA/0D-43379-124DF234 for ; Tue, 20 Sep 2005 05:19:29 -0400 Received: from nest.netphobia.fi (YZDCXXXI.dsl.saunalahti.fi [85.76.35.232]) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 4FE4DD2188; Tue, 20 Sep 2005 12:19:24 +0300 (EEST) Received: from nest.netphobia.fi (nest.netphobia.fi [127.0.0.1]) by nest.netphobia.fi (8.13.1/8.13.1) with ESMTP id j8K9JSZP007703; Tue, 20 Sep 2005 12:19:28 +0300 Received: from localhost (jani@localhost) by nest.netphobia.fi (8.13.1/8.13.1/Submit) with ESMTP id j8K9JS1G007700; Tue, 20 Sep 2005 12:19:28 +0300 X-Authentication-Warning: nest.netphobia.fi: jani owned process doing -bs Date: Tue, 20 Sep 2005 12:19:28 +0300 (EEST) Reply-To: Jani Taskinen To: Nuno Lopes cc: PHPdev In-Reply-To: <004901c5bd61$0c044150$0100a8c0@pc07653> Message-ID: References: <004901c5bd61$0c044150$0100a8c0@pc07653> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [PHP-DEV] generate a notice for bogus function calls From: sniper@iki.fi (Jani Taskinen) No way. --Jani 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 @ Disclaimer: Donating money may make me happier and friendlier for a limited period!