Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48346 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52297 invoked from network); 19 May 2010 11:43:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2010 11:43:53 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.226.6.51 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.226.6.51 darkcity.gna.ch Linux 2.6 Received: from [195.226.6.51] ([195.226.6.51:33440] helo=mail.gna.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/83-34085-7FEC3FB4 for ; Wed, 19 May 2010 07:43:52 -0400 Received: from localhost (localhost [127.0.0.1]) by darkcity.gna.ch (Postfix) with ESMTP id AF473193E7B; Wed, 19 May 2010 13:43:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at gna.ch Received: from mail.gna.ch ([127.0.0.1]) by localhost (gna.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FuimHxkTpFOZ; Wed, 19 May 2010 13:43:48 +0200 (CEST) Received: from [192.168.1.72] (80-219-160-142.dclient.hispeed.ch [80.219.160.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id C4E7C193AB8; Wed, 19 May 2010 13:43:47 +0200 (CEST) Message-ID: <4BF3CEF3.6070805@cschneid.com> Date: Wed, 19 May 2010 13:43:47 +0200 User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Mathias Grimm CC: internals@lists.php.net References: <4BF31F28.9030201@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [SUGGEST] - passthru From: cschneid@cschneid.com (Christian Schneider) Mathias Grimm wrote: > call_user_func_array('a',func_get_args());// a(pervade(); Two things: a) There is a way of doing it and although it is a bit cryptic I find it appropriate since I don't consider this something which should be done in regular code. b) pervade() could not be a normal function but would have to be a special language construct as far as I can see as the compiler needs to know to call a() with multiple arguments. Not desirable IMHO. If you want to have multiple dynamic arguments to pass on like this I'd suggest you use one associative array as parameter instead. Like function a($p = array()) { ... } function aa($p = array()) { a($p); } aa(array("foo" => 42, "bar" => 17)); with the additional benefit of having named (and extensible) parameters as an added bonus. - Chris