Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119351 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98119 invoked from network); 19 Jan 2023 16:29:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2023 16:29:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8C2CF1804AA for ; Thu, 19 Jan 2023 08:29:32 -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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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, 19 Jan 2023 08:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1674145769; bh=6xCMq5du5d5giZONzLlur1AQtLHoRFEPwthfWiwmtg4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=i+7hBjkUl1l0z576Pxfvaqv2sWee+tUUHJCxItBdzLOzF4Jmyau0j1JZuYpTKgEZ6 0wAljF5NO/uqsMajD7p5UAHwldUVVS/vhn2FcNaU7Gnoqr2wBLYi75zvQ72xYA0eS9 wb8TRthMVMU7yd5cmybjtrX3FtHeQK1YOiODzFyGjpbTg1TWnT4ET27KnDcPKsZooN IAWOKIoR9jZ8a3YbqEPHRpisEiNos2RqxK7Xa01c5REb6g6BW/RG6pMle17VCzRlAf CU4heoFxWyCmtowC1D3dmo9bak2PvdofacZC2AwqRo5Ad/dpGNB5opyTdHfBtDwVj1 CTPXWmyCulHLA== Message-ID: <4b31e1a3-80ef-4f67-8fcc-c06b8cb87922@bastelstu.be> Date: Thu, 19 Jan 2023 17:29:28 +0100 MIME-Version: 1.0 Content-Language: en-US To: Nicolas Grekas , PHP Internals List References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Pass Scope to Magic Accessors From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 1/19/23 17:23, Nicolas Grekas wrote: > Ilija and I would like to start a discussion about the following RFC: > https://wiki.php.net/rfc/pass_scope_to_magic_accessors > > When using magic methods to access actual properties, respecting their > declared visibility is often desired. Yet, accessing the calling scope to > emulate the visibility restrictions is unreasonably difficult at the > moment. This RFC proposes to pass the calling scope to magic accessors to > make it trivial to get it. > Unless I missed anything, the RFC does not explain how the values that are passed into the second parameter will look like. What kinds of strings will be passed? When will the value be null? Best regards Tim Düsterhus