Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25565 invoked from network); 17 Apr 2012 22:41:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2012 22:41:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:60423] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/E7-21594-381FD8F4 for ; Tue, 17 Apr 2012 18:41:08 -0400 Received: from [192.168.2.230] (ppp-88-217-72-149.dynamic.mnet-online.de [88.217.72.149]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 4D873609AF; Wed, 18 Apr 2012 00:41:04 +0200 (CEST) To: Stefan Neufeind Cc: php-dev In-Reply-To: <4F8DE877.1010600@php.net> References: <4F8DE877.1010600@php.net> Content-Type: text/plain; charset="UTF-8" Date: Wed, 18 Apr 2012 00:41:02 +0200 Message-ID: <1334702462.4324.207.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Variable-length args by reference From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2012-04-18 at 00:02 +0200, Stefan Neufeind wrote: > How would you think about extending func_get_args() and func_get_arg() > to allow for: > > $args = func_get_args(FUNC_GET_ARGS_BY_REFERENCE); > $arg0 = func_get_arg (0, FUNC_GET_ARGS_BY_REFERENCE); > > (default would be FUNC_GET_ARGS_BY_COPY) Well we have to know the type before actually calling the function as for references we need something we can write to. So unless somebody comes up with a clever trick this would require a new language construct. And well, as a sidenote which I mention often: Don't use references :-) johannes