Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68644 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16744 invoked from network); 28 Aug 2013 19:27:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Aug 2013 19:27:56 -0000 Authentication-Results: pb1.pair.com header.from=leverton@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leverton@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.45 as permitted sender) X-PHP-List-Original-Sender: leverton@gmail.com X-Host-Fingerprint: 209.85.219.45 mail-oa0-f45.google.com Received: from [209.85.219.45] ([209.85.219.45:43924] helo=mail-oa0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/73-33204-C3F4E125 for ; Wed, 28 Aug 2013 15:27:56 -0400 Received: by mail-oa0-f45.google.com with SMTP id m1so4694840oag.32 for ; Wed, 28 Aug 2013 12:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gvLDz1oEaqgpx+CL2+ZJyzytqPi7O2NX/ZL9GO6XHMA=; b=Drh2n0MvjLPwJmB7DkVF1SjupOHpYkaho52hebLiTVQ/fp1H74c9Av7P/FU69T2KGw mspc4Dl57LZAlwjefFz3SDQI7rrdDoXT1Zc4p5sgqIvW1ns7rcr+59FQVwtbj56NYTIS cDlzadazM1+F2p4dSJL6bz7hN/eejiHiSgQlHnT12l9nQe0PjvGNTw27NaKMp0C10cPL Z4VicYSPdnWhos901rwrkVDFkIfIvPk13rVSa7J7+BYSogzk0HrZ1DnWeTe3vzQmMqOz XxJ8QNU2oeQPqzw/5BuTvU82DjDNd9aXUJ7CYEuFmh70pCf/iIhBhpAypT97K0brz95o DfNA== MIME-Version: 1.0 X-Received: by 10.60.95.40 with SMTP id dh8mr22025958oeb.20.1377718073818; Wed, 28 Aug 2013 12:27:53 -0700 (PDT) Received: by 10.182.133.34 with HTTP; Wed, 28 Aug 2013 12:27:53 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Aug 2013 14:27:53 -0500 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Syntax for variadic functions From: leverton@gmail.com (Matthew Leverton) On Wed, Aug 28, 2013 at 10:47 AM, Nikita Popov wrote: > Hi internals! > > I'd like to propose an RFC, which adds dedicated syntax for variadic > functions: > ... > > What are your thoughts on this? > I think it's great way to clean things up and add some subtle new functionality, particularly with Lazare's follow-up proposal about expanding an indexed array into arguments. Would any functions get deprecated as a result of this? e.g., func_get_args() I assume it's a syntax error to do function fn(...$foo, $bar) or function fn(...$foo, ...$bar) I assume that function fn($a, $b = null, ...$c) is possible, and the only way to populate $c is to call fn with three or more parameters. -- Matthew Leverton