Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68653 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33197 invoked from network); 28 Aug 2013 21:06:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Aug 2013 21:06:35 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:47978] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/17-33204-A566E125 for ; Wed, 28 Aug 2013 17:06:34 -0400 Received: by mail-ob0-f170.google.com with SMTP id eh20so7357578obb.15 for ; Wed, 28 Aug 2013 14:06:31 -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=QKw+zvWW5dxA+G3Jj3WGT44nuBIrcC0EDz+/HQC42mU=; b=AjsxMXBQoggLF7FFnf2GywsHLYtxzA9drE4Yi0VvHWLu8UgdZoV9/QWk1O9jtYfwl4 QV8qXmeODsYjJLYyVPzDw1/ooooU0hgIGPT92snZuzyfpZlf0IefvI2VWo7GSCsG4jJc CzP5OWCWaEi+6wsZsoluO4ap6xvwWasAz2RqbumdzizNjF7hCK9udymAuT/f6QOtaATN LIN4ocQK3rKoFQNkuHhMR2RSmoZJNzA4C7dCaOYxGs0eGqyM8VShIifrVMf0MUN8u3KB wwL7k2M6mDJaSYE+pyVrMc0NIR4Swd2qvYBClLLbWoZXQ6c15NuUbNpxt/dNmK8zjyzt h2Mg== MIME-Version: 1.0 X-Received: by 10.60.80.167 with SMTP id s7mr16746724oex.38.1377723991406; Wed, 28 Aug 2013 14:06:31 -0700 (PDT) Received: by 10.182.98.8 with HTTP; Wed, 28 Aug 2013 14:06:31 -0700 (PDT) In-Reply-To: References: Date: Wed, 28 Aug 2013 23:06:31 +0200 Message-ID: To: Damian Wadley Cc: Matthew Leverton , PHP internals Content-Type: multipart/alternative; boundary=089e01228b141b3ef004e5085dd7 Subject: Re: [PHP-DEV] [RFC] Syntax for variadic functions From: nikita.ppv@gmail.com (Nikita Popov) --089e01228b141b3ef004e5085dd7 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Aug 28, 2013 at 11:01 PM, Damian Wadley wrote: > How about having the ellipsis _after_ the variable? That then coincides > with phpDocumentor's recommended syntax of "$c,..." > That syntax has it neither before nor after, because there is no parameter name. and it keeps any typehint or & with the variable name ("array &$arr..." > versus "array &...$arr") and, honestly, I think that reads more easily. > Please see the https://wiki.php.net/rfc/variadics#choice_of_syntax section of the RFC. Quoting: "With ref-modifier (&$args...) this does not show well that the individual arguments are references, rather than $args itself. With typehint (array $args...) it also looks like the typehint applies to $args itself rather than all variadic arguments." Thanks, Nikita --089e01228b141b3ef004e5085dd7--