Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110022 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19394 invoked from network); 5 May 2020 20:14:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 May 2020 20:14:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8E63C180503 for ; Tue, 5 May 2020 11:49:20 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 5 May 2020 11:49:20 -0700 (PDT) Received: by mail-qt1-f177.google.com with SMTP id g26so2868583qtv.13 for ; Tue, 05 May 2020 11:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tCBStzxp16g2K+Q4W29+Yg+lgC7bV5JRBuxO48JEipg=; b=s2I0maTwTYXoMfqZXjjp7HAZm3/a+WWOFrfIblgRhI+Q+HofImKaOgY43Uu8gXfz1+ Z5K7YdI7TJEE1Qy+baOhCcsGmVoJlk5uEDdpD5pa3egaMj0/yBPA/1N6BQqc0EX8tkxb 2SnDIjU856ZinurDEDLRp4JTMqw0pMTYj0Xp7Hlj2IG7hrJygVmZNJXMQke/5L/3Nr+U f0iaq9wcklZnmjlzfw6913v3RStCn4VIClI9m+rneEL+fEJH8Ps2aMmmsXgoaliNWpDZ BXStiQIGh4a6w0sKud13nzW2udqcZTehtnH3usStgZf8wS3bJpUlLLfCWGJrQacPdWCh vIjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tCBStzxp16g2K+Q4W29+Yg+lgC7bV5JRBuxO48JEipg=; b=TA+dENx0fm+Nv6pBWJkAMNIJGAgo5cw47RNH5piEndLoBzwGWNjDsVWdf/qcQXMYgo aciGll9nSwGx2KTmjd1RzDnTxzEC1OgQXVQIbpvADeWdHLdo0bg13fQIXAipLGOw2LlW rHvB5UC1buxJlDfBu8P7I3THYqsh1Zwgr9BnHv02zaOz36O1pAJT3T2YuD1lCvGeKaXW C9c+dkiCqti7a8UbPxt4o2+sloDiaLrKCtDUzfQo3AjyZCSsGEAX+UBx2s9j+NwRtCAT zNF8Ew9VbWIaARfo8EFzfwO7F/BNfwuycBvp4cPaiL3b5STIAa24/VgUSnjt3xvX1An7 LyWw== X-Gm-Message-State: AGi0Pub2CnTSTsTxCw6gElbKxunSqE1n5iTab4sf17wJjhO/H/RMuDsq 2khDx3hi3aFngB9sVVPQnGthUQ== X-Google-Smtp-Source: APiQypLH3nSD8LXtq2F3x6se51lfUsHmi+N+eHgSbcrdUmYUkqxDhW+1DRCXLLawo/3vm5OAWXj/CQ== X-Received: by 2002:aed:2a43:: with SMTP id k3mr4271404qtf.208.1588704559513; Tue, 05 May 2020 11:49:19 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:7532:4115:1941:58fe? ([2601:c0:c680:5cc0:7532:4115:1941:58fe]) by smtp.gmail.com with ESMTPSA id k43sm2670461qtk.67.2020.05.05.11.49.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2020 11:49:18 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) In-Reply-To: Date: Tue, 5 May 2020 14:49:17 -0400 Cc: Nikita Popov , Marco Pivetta , Theodore Brown , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <5FD0F72B-4376-48DC-8629-74CC24E7CD81@newclarity.net> References: To: Lynn X-Mailer: Apple Mail (2.3445.104.11) Subject: Re: [PHP-DEV] [RFC] Named arguments From: mike@newclarity.net (Mike Schinkel) > On May 5, 2020, at 2:37 PM, Lynn wrote: >=20 > If I understand this correctly, something like this could be done? >=20 > ``` > // current version, argument name =3D "firstArgument" > function example(string $firstArgument) {} > // name changes, bc can be kept, argument name =3D "firstArgument" and > "argument" > function example(string firstArgument: $argument) {} > ``` > This would make it possible to keep backwards compatibility, and = perhaps > even trigger a notice when called with the old name? >=20 I was going to suggest similar, but with the `as` keyword similar to the = use in the `use` statement: function example( string $argument as firstArg ) {} -Mike=