Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122704 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 0C7041AD8F6 for ; Thu, 21 Mar 2024 09:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1711012237; bh=elTMCbmq9GxJ709BImnTYvVHz17LEQY9E2pAe4d3924=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YFqYegOGlmhNMvzKqOHLtLGiNNEplynD2+e40qGijoWhQvIGRTtMTMB5TTdDGdvdE 8qo7fBZcJ/JJEVW8VgQzzCJldLIcUEBYJ+fmpwsRPy/icOQ77bai9Pr6p0pYCQ6C0R gmc6gfVetUPa2Wb1XsaDb2O09kEQ3T99OfAr5jcDTycR/xMvu1P+XZrrweC32yGsA5 DVQKj63Ty07d7z0mR+ITmTfnUih5JGHZk4a5zyf/JYTzAvnZt+7k5pfYEUtHLbagBn C+DHjP+20sYMBww1oZhUyA6pS1n3ri2ba261J5e9jTIn2pDMLGehRaEfPb3w14DnuF fhfsk884FnoRw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6C79918003F for ; Thu, 21 Mar 2024 09:10:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-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,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f45.google.com (mail-oo1-f45.google.com [209.85.161.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 21 Mar 2024 09:10:35 +0000 (UTC) Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-5a4b35ff84eso377353eaf.2 for ; Thu, 21 Mar 2024 02:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711012213; x=1711617013; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BbfThNlzFfBba5aK9A/bqcBiBFlhhaP8vEwn+lgjJYs=; b=mXHjmGxBqhEoLwLxfKk6H5aQLlsx58vYzGPhzlRDTZBPNNN4NOOxqzOsNKQBQb50JM KBM7lcy72iSuY2Kq+p/cKnC+j/vnqY3z8GSCeOs29FbAU06qeTv8cye2KBNJCZmun1ks Gtfbud1EgtQr22AFKiRgef5Jxf/pI2g57S2/Sn1mkvjgODalsvs/5XWtTgxfyqYhfo4d uCqzNu6BPoJ6DXFtcHG3bjrCHSUHaeyaIm0k7Hip2XmhMUdeHQvfjN+Z5yRSzQ2O+Xo1 iPlMJZA/QYgu3a61CULrmhDiqXZ0nk0i2jLaaoNQK4CDu5F7/Qr/jw95aLyiuFeleZ+I uvdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711012213; x=1711617013; 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=BbfThNlzFfBba5aK9A/bqcBiBFlhhaP8vEwn+lgjJYs=; b=MGZn6ZkNDkFO9e7BEetJRGDO5W4seTQEqfBx2eFqh/Kasdz3Qb44P7GlVkpzVpNu+Z 1T5h7Ffhl/MieTnv5HvP2cB/XFJuLB85JgKvPdxLOrF0MZCrTR/wviGpjbwO57XMLhjc zWJceYWM8ROOcrAL3sfzIA2K/pzF+JQKnyTCndABizOx+uI6vbAnmSLbx4ER9Zyu+Cmt PjIsdpXsEHSMyXi2t77mb17ZztmC71SqvP6aKf410lrCxM8E2o080flZwSWy+7bAIl5r zxVtw5LD8US40bJOJihA99ZzmvgX0cjjZFMtVK5Gsohbo6degwMiYX0Aqn2Fy+1c9eo5 KVqw== X-Gm-Message-State: AOJu0Yx9VGjZUeYYGOWGnYraIdM7E/00lxtai3CI7Xxcsyov1ss4FzlU slRk9DLobPcqfjK5BpUuZrtSWlcd0oHsjk5IHPzMEM9V/MmSbOvO1nf4jiZ+/YbbPXdOEwQ/hsh OCV8xbXYuQZx08SwfhW8KtKb5z0ckRQfZrwAEYw== X-Google-Smtp-Source: AGHT+IHt47CuQWa37JogL+QbQOBAk5acJzwh/C7i1Sj0FGAHSgJTzP3nl93Uw01dGGbstxar0edWnPFDBOWNCh0+seQ= X-Received: by 2002:a05:6820:2d43:b0:5a5:411:dafc with SMTP id dz3-20020a0568202d4300b005a50411dafcmr1126776oob.0.1711012213488; Thu, 21 Mar 2024 02:10:13 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <452aae1b-8929-4f08-a388-45b374d2a365@app.fastmail.com> In-Reply-To: <452aae1b-8929-4f08-a388-45b374d2a365@app.fastmail.com> Date: Thu, 21 Mar 2024 10:10:02 +0100 Message-ID: Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" From: landers.robert@gmail.com (Robert Landers) Hello, I'm a bit confused on inheritance. In the following example of a proxy, do I need to be aware of a parent's hook and handle it specially? class Loud { public string $name { get { return strtoupper($this->name); } } } class LoudProxy extends Loud { public string $name { get { // detected the parent has a hook? // $return = parent::$name::get(); // do something with return // return $return; } } } what happens if the Loud class later removes its hook implementation (ex: moves it to the set hook)? Will my proxy now cause an error? Would simply calling $this->name call the parents hook? Robert Landers Software Engineer Utrecht NL