Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119350 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96585 invoked from network); 19 Jan 2023 16:23:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2023 16:23:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5FADF1804A9 for ; Thu, 19 Jan 2023 08:23:52 -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=0.6 required=5.0 tests=BAYES_50,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, 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-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 08:23:51 -0800 (PST) Received: by mail-wm1-f43.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so1664135wms.2 for ; Thu, 19 Jan 2023 08:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=1GJpjzACBScBBUCv+uH/CYro+U2I7z3e8gczmcIDMKA=; b=qsjdOESh12sVZIgMjRRHirQMun9puAgbsix2mvOaVMxjixtiYH1Wscq34LphczDnnz 1her9ZTJbRRrp9MVcevPuK//HRjsfRYFWuApBv2DOYNPjmkz/+OGfUuomz/rB3RN6Ree BPY+XLGg3vqfJZtjxT5rPpXFmk9gh4HUPpJt/qfrpe4odgliUPamllKNnnMC6yh3IsHU WTjhLAs08+/CrpikpLSx1gmSditelqWwucbmgFliVSj5jD5Kv8LnWhwA6z68pQ52RjjR yGf2Qqvi/1C+/Cz+SZxYPIMMGu15gq/IU5BXa2S1LN3r0YXwVMX6yUb2od0dLV+iijW7 ti1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=1GJpjzACBScBBUCv+uH/CYro+U2I7z3e8gczmcIDMKA=; b=vf2B5iGlrcK8fbpydoFYNAPpFK3EssiEvFzQaQNpOMTzSOCLmln5sw1fDaVVfoOiwj /KnUQINbncO2+x6KpZdXCYh6MOQQduyy+LDLPE/iKMdLh/WaGDNYZ3ijiXZOKHAsyHoU DzoU+OjhG8gJMe5vFcBaaBBWFkp+LrPuRT1D+SJTO35SopVRqu6zvh04gHHrirgBdO2g t5ZFKMLken2WXpSWgNbYyrmsFz0yWvSAM0iH/0f9HHxN85cUeyPRK/Nv3eC+nA/sjJVK he3zG9m4RnhXf3ira3+XeDobZNjv0Ave5u45h1hAb1CAWKXX6w6eFSrb7hkbsag+DiP5 rvvQ== X-Gm-Message-State: AFqh2kqTs+OIRSTkc/9facu3aahOjeEijOHPSuQu4WzZWWLX3we+Un36 Nw+2ZRIpmgiT+Wd7aXwA52ZuihBsySlsdwNevnY3Xm/TmvxNMw== X-Google-Smtp-Source: AMrXdXs3mX+01BskGqsW43bYmyd+JLNpj+alLm4A2P3Q61yod6Ii/AU0lJGd7MsmV+8xSXMLYv4QJu1bSZZVc2/5uE8= X-Received: by 2002:a05:600c:4f41:b0:3db:14e1:d16e with SMTP id m1-20020a05600c4f4100b003db14e1d16emr525584wmq.35.1674145429611; Thu, 19 Jan 2023 08:23:49 -0800 (PST) MIME-Version: 1.0 Date: Thu, 19 Jan 2023 17:23:38 +0100 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000a2694a05f2a05b49" Subject: [RFC] Pass Scope to Magic Accessors From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a2694a05f2a05b49 Content-Type: text/plain; charset="UTF-8" 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. Kind regards, Nicolas --000000000000a2694a05f2a05b49--