Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121766 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 94677 invoked from network); 23 Nov 2023 01:37:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Nov 2023 01:37:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5319918003B for ; Wed, 22 Nov 2023 17:37:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 ; Wed, 22 Nov 2023 17:37:23 -0800 (PST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4083ac51d8aso2041755e9.2 for ; Wed, 22 Nov 2023 17:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700703438; x=1701308238; darn=lists.php.net; h=to:references:message-id:date:cc:in-reply-to:from:subject :mime-version:content-transfer-encoding:from:to:cc:subject:date :message-id:reply-to; bh=khl4TTNqCLXTWDd+IlJVrV2VFVSVZJu1gXiCVf/jWUI=; b=BCtJlw3ZGO7vSE0Hd+/W1y1rP3imlAVRIFVcOD4yYNuKExfQXxFi1dOlqsSJQDvI87 o/xTvK1DlEETgnc1kQA9Dd9cPQ/20rjZn7lnALkH2oDlZbmWJBYzsiumORitLzTxdeae uFVVEdd6zK4DVOR8k78P9Fib8o0GEyf/eNU+VJ/SKYMr5gbLtx10xN4/nYVc2Z559PLC foAGMq+OdIgABTs5cxw9doWg0I2Mle7HCWTA0Y3P/bNtZTouJSGiYnkxxO84iURyrjgJ XOk2Yc7P5yGA3gWvgyH/dQzKp9ObL0bUMVwo8j4V/Aw5f7vsoEKGq5vmn+eLco+Xb8dD cn8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700703438; x=1701308238; h=to:references:message-id:date:cc:in-reply-to:from:subject :mime-version:content-transfer-encoding:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=khl4TTNqCLXTWDd+IlJVrV2VFVSVZJu1gXiCVf/jWUI=; b=bReYDJv8dY7UVKbQWgk039yvUrzn/BKcCZVoi0hc5NTj0pOcz+j4ArTiGQ7clZJZMH BrfcWz4PunwQ6I0ojPXzVs2uG6FMLRhfpUKYOkGejRNxFmLu0H/It1oq9orJDosKM6sg uhW+Q72BxGmUek6gQCOEvF7InBSHQfVLEiJSFMipvwPGRPQ0FU66Vi3BKRcHPLJaPdQ4 uT6Bj9I8B+EKTu41sOhAdCMaWKbUJml7m9O1qemTmAPG/2b+noBJ92Txo4IID0kISLz3 ATrchBXNJ9Z7/Z8JbDDt9mVvGm31Lwcg6ypSK9U7k0i0DEVmoXLWqc6WK5XseZp7fcgU eT9A== X-Gm-Message-State: AOJu0YzFztxFGZ3rrluVNysjLPT/zVAsIKJrF/BnGCxIEDVYnCXoL45o GGsZFxHeTGG/mdGABk35ySLVbEMyASM= X-Google-Smtp-Source: AGHT+IFPMuvF4RC/PehRlrNnoC7YKhfjxQJDL6FLhxKGrdw2qDU0GCnxQZErNWY/T82ePSsUFJRbzQ== X-Received: by 2002:a05:600c:3b16:b0:40b:3441:37 with SMTP id m22-20020a05600c3b1600b0040b34410037mr1478674wms.30.1700703438122; Wed, 22 Nov 2023 17:37:18 -0800 (PST) Received: from smtpclient.apple ([178.197.195.63]) by smtp.gmail.com with ESMTPSA id t20-20020adfa2d4000000b00332cbece829sm114187wra.59.2023.11.22.17.37.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Nov 2023 17:37:17 -0800 (PST) Content-Type: multipart/alternative; boundary=Apple-Mail-1D1D7FBC-FB94-4B4D-8E76-A295B2757260 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (1.0) In-Reply-To: Cc: PHP Internals Date: Thu, 23 Nov 2023 02:37:06 +0100 Message-ID: References: To: Rowan Tommins X-Mailer: iPhone Mail (20H19) Subject: Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties From: claude.pache@gmail.com (Claude Pache) --Apple-Mail-1D1D7FBC-FB94-4B4D-8E76-A295B2757260 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > Le 22 nov. 2023 =C3=A0 23:17, Rowan Tommins a =C3= =A9crit : >=20 > I'm probably going to regret asking this, but is there some reason it work= s that way? Is there any chance of changing it to just: >=20 >> Typed properties start off as uninitialized. >>=20 >> Once you've assigned a value, you can't go back to the original uninitial= ized state using unset() >>=20 >> Accessing an uninitialized property will first check for __get, and throw= an error if that isn't defined. Hi Rowan, What you describe in the last sentence is what was initially designed and im= plemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 (section O= verloaded Properties). However, it was later changed to the current semantics (unset() needed in or= der to trigger __get()) in https://github.com/php/php-src/pull/4974 =E2=80=94Claude= --Apple-Mail-1D1D7FBC-FB94-4B4D-8E76-A295B2757260--