Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110082 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59851 invoked from network); 8 May 2020 12:02:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 May 2020 12:02:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F2EA01804C2 for ; Fri, 8 May 2020 03:37:41 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 ; Fri, 8 May 2020 03:37:41 -0700 (PDT) Received: by mail-ej1-f49.google.com with SMTP id s3so924996eji.6 for ; Fri, 08 May 2020 03:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w45YeRGGblH729r2Aa5k3N4SGcGvfyBGRFcLb9IxJ9I=; b=EcCKng52LkBIEsKq7fWY5OG32TeObRrInlieymZKOyI5NLGz4XqtocC/GWQre89kyp SUyOXr9tlHv0JXvkXVVc/ukUo5a/bnpyZQYks4/x8zkVL7SzdXqyhavBpKURDB11wHGh PuCg1IOTpQ+UEPl14L41uV3NutT9EXJgjSvZPLv0dQPUzxOPGyLhOdm9OqBWFOTCt+Fv ie/xgboQSjKIu1m0WYc5ZQZNbsQWxl8kVDkFh7agqNkWHyOMEtHhDgyIQxEAKslPwcsR 0n9d6SBTFXhuufotlgIhu+EAEzF0SSxo33KqnHAw1yZtvBp3uMlP2hdpJ+a6+fdMbBOx PLcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w45YeRGGblH729r2Aa5k3N4SGcGvfyBGRFcLb9IxJ9I=; b=j30qOVsDYntiOWX6phkFGDVjESaKaEHm7NIl+VhmstxDUfXL3AaTZJ/gTCu6yyBeeZ ZNq1zrc25mdAW1+qonSL0h+Pri8q5454WBo8vLrqpMqpRDegAAmX/BIOckUSL5C9mSnv 4JzyPvHidcN01OyV2QRH/RS9KXRW+tjrqkb5BjSqkeAHOsBGDn1Yp9XPJ5HwaM/QRGmq FJAm/UZ6RrezDFGosVKoPeiNAsbOcnPDxOF6OFLwnckyIWYvdhX9C7hHxw1AEsMXPyFw xUjrGLN6wi4GsVDsLPpfrTiXY232vgfnkaNasCf8oBsUo8WJEWYL+7ihPG0F5QTJR9rw o2Qw== X-Gm-Message-State: AGi0PuY8JgckZ/+WKy/sOt6ZXz7kExgSF9qnlbiC1i2XQcXXM8zOJpUA vp98fOkB9dbiYHU+5r2UXq+sh/IK96mhDDvgjCYyc3qlHO0= X-Google-Smtp-Source: APiQypJe8dbwXi2+gfD5nSGB5hPouIkVpIHXzOxSQ2iemla+xZiWQizkFV+0/g0UIdQWPPq6XNjyRntuZ5v3n0IgDao= X-Received: by 2002:a17:906:28c3:: with SMTP id p3mr1290420ejd.130.1588934260021; Fri, 08 May 2020 03:37:40 -0700 (PDT) MIME-Version: 1.0 References: <171dee3baf3.bef5753260554.3262181919550021853@manuelcanga.dev> In-Reply-To: <171dee3baf3.bef5753260554.3262181919550021853@manuelcanga.dev> Date: Fri, 8 May 2020 12:37:29 +0200 Message-ID: To: Manuel Canga Cc: Internals Content-Type: multipart/alternative; boundary="00000000000023dbd005a52096ca" Subject: Re: [PHP-DEV] [RFC] Keep type of reference params From: george.banyard@gmail.com ("G. P. B.") --00000000000023dbd005a52096ca Content-Type: text/plain; charset="UTF-8" On Mon, 4 May 2020 at 10:54, Manuel Canga wrote: > Hi internals, > I would like to present a possible new RFC( "keep type of reference > params" ) for your > consideration. > [...] > The result of this code is a warning( in count line ) because of $array is > a string. > > However, I think it should be an error or exception when a string is > assigned to $array var. > > In my opinion, $array var would have to keep its type when function ends. > > What is your opinion ? Do you see it useful ? I think everyone can agree this is useful. But the issue here is the implementation. Because from what I know PHP's references are a special kind of pain in the engine. That's why the common wisdom is to use references in PHP as least as possible. And IIRC what you are trying to achieve would need a major overhaul of how references work and someone who wanted to tackle this would have done it on their own and propose an RFC at the same time. So sadly unless something semi-concrete shows up, I'm considering this a pipe dream. But I'd gladly be shown otherwise. Best regards George P. Banyard --00000000000023dbd005a52096ca--