Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110081 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22921 invoked from network); 8 May 2020 08:13:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 May 2020 08:13:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C9FF51804CB for ; Thu, 7 May 2020 23:49:16 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS2639 136.143.188.0/24 X-Spam-Virus: No X-Envelope-From: Received: from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com [136.143.188.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 7 May 2020 23:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588920553; cv=none; d=zohomail.com; s=zohoarc; b=NBPL+CSP77V5TIAq7rX0KjLj+smxii2CczYAWH3YuXrAJS7KFYFiLuhKkNmJ/gcSi5Rz4QWkEK/RKUPKwMaJOQ6k+0el19A1uJzPgb32ZV/+L7tIou2tOzmVm2lCpE2bSKePliDW9Y2NPPUeaTdM50CVxwCvyDffy22hNtJ4UQw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588920553; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=RQ4AHev+aXF4SMhqW6FgBhqkqA22TCDGDvhYqmur9yg=; b=V563r0JiprI5AFWnrK9XUFNpniyuXQlMUgWz9JLtmPXbzXFotq0q0C5eTg+kNFMD8xkXauu3hdhPdsEkFB0WPeqMTki44L7S/l1rxBADpFzsE4gbGJa7G48oZsCzfvgqqzXx0zRsEPyLCR7LTR2tSa1+IIDp97ZZmrs+r+EtePM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=manuelcanga.dev; spf=pass smtp.mailfrom=php@manuelcanga.dev; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1588920553; s=zoho; d=manuelcanga.dev; i=php@manuelcanga.dev; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=RQ4AHev+aXF4SMhqW6FgBhqkqA22TCDGDvhYqmur9yg=; b=amgja4Mg2xAr0IWQz4YHp95Q/fQk3WQqY9KuXoGD5Kl68ElVoMjmGDSqPbIT1GAk a4+IsJ8Or0Y5+3vt0YhlnSRA5CP96eGZgVJuUws20Tu2Ya4wn3jZHC5pJ27Kgy3IqFq l1bpFUH/TBVZ92BBi6tGsY1dv6oi+6YVIKOsNYyY= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1588920520178231.69824948495295; Thu, 7 May 2020 23:48:40 -0700 (PDT) Date: Fri, 08 May 2020 08:48:40 +0200 To: "Rowan Tommins" Cc: "internals" Message-ID: <171f30b0df0.102b810be444185.2462173785894899100@manuelcanga.dev> In-Reply-To: <10faa29f-f08f-a73e-b76d-683f5abbee86@gmail.com> References: <171dee3baf3.bef5753260554.3262181919550021853@manuelcanga.dev> <171e05b4ced.1041f31b5124598.4028595156690203917@manuelcanga.dev> <10faa29f-f08f-a73e-b76d-683f5abbee86@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Subject: Re: [PHP-DEV] [RFC] Keep type of reference params From: php@manuelcanga.dev (Manuel Canga) ---- En lun, 04 may 2020 19:33:51 +0200 Rowan Tommins escribi=C3=B3 ---- > On 04/05/2020 16:43, Manuel Canga wrote: > > I think I=E2=80=99d be positive of adding `inout` keyword in order to: > > > > - Check type of out is equal to type of param( like example of my firs= t email ). > > - Avoid modifying caller var value when the function throws an excepti= on >=20 >=20 > Another huge advantage of adding inout parameters is that we could make= =20 > it mandatory to mark at the call-site, and get the advantages of this=20 > RFC with less of the compatibility hassle of changing the way references= =20 > work: https://wiki.php.net/rfc/explicit_send_by_ref >=20 > We'd still need to figure out how to smoothly transition built-in=20 > functions to use inout rather than by-ref parameters; but then we=20 > already have magic "prefer-ref" in internal functions, so maybe we could= =20 > come up with some kind of "prefer-inout". >=20 =20 Hi, Rowan. That's a good point. If nobody objects to this RFC, could someone give me(manuelcanga user ) kar= ma in order to create wiki page ?. Thanks in adavance -- Manuel Canga