Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108699 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13960 invoked from network); 20 Feb 2020 15:58:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Feb 2020 15:58:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 28B1418050B for ; Thu, 20 Feb 2020 06:14:20 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 ; Thu, 20 Feb 2020 06:14:19 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id n18so4367235ljo.7 for ; Thu, 20 Feb 2020 06:14:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2lhq7Ywqbsu9y3uCuyb+BH9NLxpbde2CnQb/1b2ySo8=; b=GaIoQkPlMUOvsZ8CVw3uQN6kLvHQhAYJBamB9M4oDzDHR00j0VI2pCWW3LcsYqM/m8 OqS9jNvtLj80AlmPtEUtZwIOXL/fiCY/nDxAInUeua/dbtOdkkei5D238OgrSVtIRQQ1 LNO8peLDhjKhuCDgMwbbUBr8YVlLR/uGpLB7aQVG7Uh253A7bozsIsNRpJfeOjg/ZXN7 pQAfTQuHPIzHgvWnJ5Hmuca0ygiOedYWHfltD44qKrcxPkxJARdyy/52hPoExJNEWcOR eOz1KhnbQQAYApHh/lzYYwMrcyT3zbszTKfyt7rw/Wee4hllKgk/gvbZ4Wlx86cvaRbP S6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2lhq7Ywqbsu9y3uCuyb+BH9NLxpbde2CnQb/1b2ySo8=; b=Qok24B2fVnWH0JcOFtfDfFJJX2Y7i7+FthZjFLqPiF2Uv2gXdrmwCKAS2aB6Jhmmea y1N/bxM7l61iAWoTfRYfVdeZhKjZo0YrUvz+AXNWVgDaEa9AKS/3HH8Vka1FpwfLILyT msZ0wESu7m0E/jkVeZzWbjrI1eyM00DEFJPEXySOMnvVkekZuVMLDYmnS/1m1jUlQt4B E50jfCQjLpHdNgLh87cqSnUdTX5Zz1aL320gL9l+mBTT/NpH2Vr3uK+RTqDeBKQ0PiUD kZO7mh7hSghlvJrYBPKzRfG/GwA//8sQhMdwqypAzNjBesrDK33nfD7ccxZuEjbuP49m stkw== X-Gm-Message-State: APjAAAUrRFXzQCL2Pq1oBuLSJORy6vbOYpgn9D2Eo/d7rZlqg/SIdr23 k6lXs6N/2eQTFpOFDi0Dka+eAAW6dRcC0VZ+K61vR32YNIDamw== X-Google-Smtp-Source: APXvYqxFMLWz9Vc/PUpdA/PHPMcqBcSInSx0HwOvCqJjYGmpyoXtQj1VC8XhswUSrF9R8cuVf9eM6oQZVaEYQPIHPRg= X-Received: by 2002:a2e:2e11:: with SMTP id u17mr18561761lju.117.1582208054623; Thu, 20 Feb 2020 06:14:14 -0800 (PST) MIME-Version: 1.0 Date: Thu, 20 Feb 2020 15:13:58 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000000e84a2059f02852f" Subject: [RFC] Explicit call-site pass-by-reference (again) From: nikita.ppv@gmail.com (Nikita Popov) --0000000000000e84a2059f02852f Content-Type: text/plain; charset="UTF-8" Hi internals, I'd like to start the discussion on the "explicit call-site pass-by-reference" RFC again: https://wiki.php.net/rfc/explicit_send_by_ref The RFC proposes to allow using a "&" marker at the call-site (in addition to the declaration-site) when by-reference passing is used. Relative to the last time this was discussed, there are three main changes to the proposal: 1. The RFC proposes a mode in which the use of & at the call-site is required. This depends on the outcome of the "language evolution" RFC. It uses a declare as a placeholder, but if we go with editions, then the mode would be enabled in the next edition instead. (If we go with none of the options, then this part of the RFC becomes void.) 2. The RFC now also tackles a long-standing problem in the handling of __call/__callStatic and call_user_func. The explicit call-site annotation allows us to use these features together with by-reference arguments. I failed to realize that the RFC can nicely solve this problem when originally proposing it. 3. The RFC now discusses the old "call-time pass-by-reference" feature in more detail, and how this RFC differs from it. The important difference is that this RFC requires the marker at both call *and* declaration. Regards, Nikita --0000000000000e84a2059f02852f--