Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119811 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56700 invoked from network); 31 Mar 2023 13:17:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Mar 2023 13:17:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0E3381804B3 for ; Fri, 31 Mar 2023 06:17:25 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 ; Fri, 31 Mar 2023 06:17:24 -0700 (PDT) Received: by mail-pf1-f175.google.com with SMTP id ce4so1734731pfb.1 for ; Fri, 31 Mar 2023 06:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680268643; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4MCtFXQ2j6TKoe3lZ8kmaVftGIPIoQRwMJngsJcTgWs=; b=PO9yUJGf3BUdI+uTUfkxXP7oJzEB0MwZ0woMJFo6SSBq3p5nmg+K0NAUvRDjT9k5kc XbXn98cmVg6b7l3oBwTe+s8bdgv3t/jKLwULmMp6FFP9iG8Ksl21XbGDHt6NabBVADhn Sg/INQvu43e7/8zgJ8jXz7fXBqUnpHE5PSR+06NAuqT48HX5yovxm1EgIt8Ge35tEKxQ alGwRF8dCuseTwIaS/yGZFuubyBD3LlGeAO97WtO4PVtKV+avBg+uAnH+mDm1IHI3Qbs sR65MabbTLgCvHszl4ZSMqg0OmjfeXrNGdSfGffuClQ0Fhs6tDwtz6HCeqhV4vRaCV9d 7MeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680268643; h=content-transfer-encoding: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=4MCtFXQ2j6TKoe3lZ8kmaVftGIPIoQRwMJngsJcTgWs=; b=K+qb2s9pUmA0+Lz6Lv7W3Ug8ryx/9p8/J7mym14vYTfX7uSlRjjHdBy/a8pVrwM2uX RWc4npygLKa4qS8wwfgcTbE5BoqgRHcZhq5JioIXHzOc2bItSw8Z31RURZ2oFHIq2EX0 jT6ShnjxPFODMqrlJidsO+jIYXtiMytDhFWLtaEfzf7J7Kyy/nmpYXr3XNRrsY3zzfSD Tf534NAeMRUMeJ0P4Cn8SJ7IjV5SPE3hk1SD8hVZj22nGDCkqjgpAAk1xo9+7eizb9vk QAaA3N+5KV//zpq2HHfDCcE0ujpCysQV3WWOfgjjrGc5EC3aWgwB5VwqEFyTGPsqgFx1 AwDQ== X-Gm-Message-State: AAQBX9fWszY0YUihlx6DObs5P35dU8OXVbE9m4j5jQmh80bm3/TQXZNz sTFNRtCx/1jsTF4BwM4IDd2MpBRn8Gr0UIJdIbRHumeH X-Google-Smtp-Source: AKy350ZeR2QzUpkFpCNlRbit1ytVI0QyQgUPnc8MeuKz9t2zIVhHT2isNX1tu840ZEWSNRTiVLdHOARD5uXQSFyZ/YI= X-Received: by 2002:a63:f009:0:b0:502:ecb9:4f23 with SMTP id k9-20020a63f009000000b00502ecb94f23mr2913987pgh.5.1680268643392; Fri, 31 Mar 2023 06:17:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 31 Mar 2023 15:17:12 +0200 Message-ID: To: internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: Property Hooks Discussion From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Robert! On Fri, Mar 31, 2023 at 10:57=E2=80=AFAM Robert Landers wrote: > I couldn't find the thread about Property Hooks > (https://wiki.php.net/rfc/property-hooks) -- I think it got embedded > in various places? Or maybe my search-fu in gmail is failing me. As Rowan has mentioned, you couldn't find an e-mail because it hasn't actually been announced yet. Larry and I are still working on the details. > What would happen with the following class: > > class BigNumbers { > public \Gmp $myNumber { > beforeSet(int|string $value) { > return gmp_init($value); > } > } > } We haven't fully decided on whether we want to allow types in hook parameters, or whether the type should be implicit. The main motivation for allowing types is that one could accept broader types in and convert the value to the property target type. But I'll need to verify the technical feasibility before we make this decision. > $x =3D $y =3D $z =3D 1; > > $x =3D=3D=3D $y && $y =3D=3D=3D $z; I'm not quite sure what this means, as this doesn't involve hooks or proper= ties. Ilija