Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68912 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27132 invoked from network); 6 Sep 2013 17:23:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Sep 2013 17:23:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 74.125.82.175 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:52854] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/E3-05619-A8F0A225 for ; Fri, 06 Sep 2013 13:23:44 -0400 Received: by mail-we0-f175.google.com with SMTP id q59so3220753wes.20 for ; Fri, 06 Sep 2013 10:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Rk9BvVPYsYysEWKaZvEkPPsc70stbBq68pltDmH/YEc=; b=CBmQv9VadyKM9n86Cs4TjzjKlH/b0BzFi/bPnTnFqNj9ZHOWveW1Gs1IGwNS+tcy4w 81lONI6ZCnicfP59FUeQqYkHVaRF+SzdjkKnJ1AkkklqFBLmQ+hSAOldhEpwqHTQdqZ+ 1FE98vKOqwCZWDSI+pExJRiLG3ArjLi9OMrbjYZPo3qre6vHUXCClagV+/0nzYmkgnIE TbOGWE9cdp/JSw7218JaH98LnjsaJoUmAGksY4Uffd24RVyKqIezM2Ac2gss5LGjZu4X liQCzERLXqRYigTHIZYdYNRy8lZoWh4SWos0xmUGCLAOFlrWkLbQoF+K+obPkc7Tnvic OqIw== X-Gm-Message-State: ALoCoQkxt41wsoNa2hY24cIIoO9onbuih3wPy/qfbWxuHzgPMSRk3nReX/YCpOQzOLOA1DlbI3PC MIME-Version: 1.0 X-Received: by 10.194.79.33 with SMTP id g1mr18940wjx.79.1378488175898; Fri, 06 Sep 2013 10:22:55 -0700 (PDT) Received: by 10.217.10.73 with HTTP; Fri, 6 Sep 2013 10:22:55 -0700 (PDT) X-Originating-IP: [78.149.7.155] In-Reply-To: References: Date: Fri, 6 Sep 2013 18:22:55 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=047d7beb9a760d437204e5ba4a14 Subject: Re: [PHP-DEV] [RFC] Named parameters From: danack@basereality.com (Dan Ackroyd) --047d7beb9a760d437204e5ba4a14 Content-Type: text/plain; charset=ISO-8859-1 Hi Nikita, Will it be possible to set the named parameter through using a parameter? i.e. can you do: function multipleParamFunction($var1 = null, $var2 = null, $var3 = null, $var4 = null) { //... } $paramToOverride = 'var3'; testFunction($paramToOverride => 'bar'); which would override 'var3' in the function. The syntax for setting a named parameter by a parameter clashes with some of the suggested syntaxes. Even if it isn't going to be possible to support this currently, it would be a good idea to not use a syntax that prevents support of this in the future. cheers Dan On Fri, Sep 6, 2013 at 5:39 PM, Nikita Popov wrote: > Hi internals! > > I created an RFC and preliminary implementation for named parameters: > > https://wiki.php.net/rfc/named_params > > The RFC and implementation are not yet complete. I mainly want to have > feedback on the idea in general and on the Open Questions ( > https://wiki.php.net/rfc/named_params#open_questions) in particular. > > Thanks, > Nikita > --047d7beb9a760d437204e5ba4a14--