Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119354 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8746 invoked from network); 19 Jan 2023 18:40:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2023 18:40:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0AD71180212 for ; Thu, 19 Jan 2023 10:40: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_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Jan 2023 10:40:16 -0800 (PST) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-4e4a6af2d99so40238937b3.4 for ; Thu, 19 Jan 2023 10:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AQ+Yqq7PJpXupunMEFoKpppRFn7H6VCdnXPQrhyE09o=; b=kd+NJ/4oJvNjL8K5btQQaZDKZLnZO8rZ5gGenYi6nHTqWHKIePZrBX7B+smHoXqQHc EQXLM2/eThSArJg6GOjBzdAjtDM4vv0tD3fgl5oe4xlnBEude6NOJW1TJSEnwkFSWNL7 QJR9SJudJrrdk7DPj/s7nIIBJruHB/rQL30O4h+MzWzDvT2VRzr9Ppopof0DYARNWJVw moejaHDvfPu2/lQ/GtLn5GWsZh1n7jGUbdYkkcB0+AgHRr8ifMY5u0t3uD+QJ4leZZ2O /RVkGmd/wBp+8jfBwYiSyVwipEWeT/7uYKoL8URfbtvXMG7D5OM7nErCT0vfbYzZreKt D0BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AQ+Yqq7PJpXupunMEFoKpppRFn7H6VCdnXPQrhyE09o=; b=QTF4r1HedAx0P5TpxA3dYgpCJcCitkCn9tx3W+FqI+okl7d2O//J4yH+hQ+qs5Xhdi vU4b8L93bDVlcZMDyk/vs+D3Qh2PNBuLCVVONOrX4xfeYDn5q1AezrVj7vSAsc7gw9ot K6VmyWHKCTMpoWXzNla/AgNP6Uv0wXzSaEAF0D1lJ4zQlMlMVlDKItQfrCTwhoOaIK6j UMEj9bpaUizyLve9nCuWuvUYg9fyZZvamtaiMceblaP/yyvsT1miw5oIMxud5aObe3qr +omsJv2AxfPP0+pbKHaJLp3UHfC4CWxqsxLCBuHtVMIkgn+ayBN1KOPImaY3A8FJuSxH GH3w== X-Gm-Message-State: AFqh2krshf3gHESTiI+xlg+/Qfw/GrCLyCd9e68WRc1YHvGs2UgajXpU gDwR+nbhd3glu4kHlAM9zoDjStCTOygojq/c2+X0EBZRof8FMg== X-Google-Smtp-Source: AMrXdXtnYAS7n5SYSwaYIJzibneOgT3HrcTW9unkxx5rNO47fw4ZFMw3TFYWjRUyh8StYKD4Zajx9n3HkhoJoJkfg2o= X-Received: by 2002:a81:a008:0:b0:4b1:9adc:9038 with SMTP id x8-20020a81a008000000b004b19adc9038mr1176924ywg.14.1674153615414; Thu, 19 Jan 2023 10:40:15 -0800 (PST) MIME-Version: 1.0 References: <1b532bf0-7934-e693-ba01-32b9587d54f5@alec.pl> In-Reply-To: <1b532bf0-7934-e693-ba01-32b9587d54f5@alec.pl> Date: Thu, 19 Jan 2023 19:40:04 +0100 Message-ID: To: Aleksander Machniak Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000008bdb5505f2a24389" Subject: Re: [PHP-DEV] [RFC] Pass Scope to Magic Accessors From: ocramius@gmail.com (Marco Pivetta) --0000000000008bdb5505f2a24389 Content-Type: text/plain; charset="UTF-8" Not just that, but `debug_backtrace()` already exists for that purpose. On Thu, 19 Jan 2023, 19:23 Aleksander Machniak, wrote: > On 19.01.2023 17:23, Nicolas Grekas wrote: > > Hi internals, > > > > 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. > > Why not a new function, e.g. func_call_scope()? It could work > everywhere, not only in magic methods. > > I guess it would be tricky with calls to the parent magic method when > you need the "outer calling scope", but I'd like to see some reasoning > in the RFC. > > -- > Aleksander Machniak > Kolab Groupware Developer [https://kolab.org] > Roundcube Webmail Developer [https://roundcube.net] > ---------------------------------------------------- > PGP: 19359DC1 # Blog: https://kolabian.wordpress.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --0000000000008bdb5505f2a24389--