Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69151 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68190 invoked from network); 16 Sep 2013 19:14:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Sep 2013 19:14:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.47 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.47 mail-oa0-f47.google.com Received: from [209.85.219.47] ([209.85.219.47:36733] helo=mail-oa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/B1-57385-EA857325 for ; Mon, 16 Sep 2013 15:14:54 -0400 Received: by mail-oa0-f47.google.com with SMTP id j20so392195oag.34 for ; Mon, 16 Sep 2013 12:14:51 -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=n3QjzkQqHRn/bhjrTeszcm831h1ZJ/NAc3hzmGc1XCY=; b=YMITnnuLDZP3mNTKuZmsbD8iv5ZKHUgTNgHpWMCK7HHs7VUxCWkYAYPpPVyxNEVugW JZBjHaO5madzGFDGnOq4HXkdEs+s79vrVSurFNynpuFcdwKqt5qir7oEP51SfrvERx2t trQ7M0b2igVy32gERh9y1kWrM1gOhEoxQ/tggSWeR+xkoYn8q+6Z4p6YfyCz0R6ICbWx iDVZYmWc+j0zURBR4/KjRS0IYaNzKItpbm9Mokdbi4kR1Peij0hvZs/hPJdYne9hfFAz rBlaGfLy6C0SAwDBdEjYtlC/Yr+XWXsu146E0r1tRPoiNklmYfPmnidgYWurqnQuVPT2 HA7w== MIME-Version: 1.0 X-Received: by 10.60.116.170 with SMTP id jx10mr40488oeb.98.1379358891510; Mon, 16 Sep 2013 12:14:51 -0700 (PDT) Received: by 10.182.98.8 with HTTP; Mon, 16 Sep 2013 12:14:51 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Sep 2013 21:14:51 +0200 Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary=089e011614debf13c204e6850449 Subject: Re: [PHP-DEV] Re: [RFC] Syntax for variadic functions From: nikita.ppv@gmail.com (Nikita Popov) --089e011614debf13c204e6850449 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 16, 2013 at 9:02 PM, Sara Golemon wrote: > >> I'd like to go forward with voting on this. Are there any issues that >> still >> need to be resolved? >> >> Assuming the RFC as-is represents the current state, I'm +1 on all of it. > > I'm not a fan of some of the proposed alterations which would translate > arrays (a la call_user_func_array()). To clarify, the following output is > what I'd expect: > function f(...$args) { > echo count($args); > } > f(1,2,3); // 3 > f([1,2,3]); // 1 > > Not "3" in both cases. > Yes, that's the output you'll get. If it weren't the case it would be impossible to define a function accepting multiple array arguments like f([1, 2, 3], [4, 5, 6], [7, 8, 9]). Nikita --089e011614debf13c204e6850449--