Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123864 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 4C5DD1A009C for ; Wed, 26 Jun 2024 12:07:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719403738; bh=njhscKxVXsc33mRGHSlG1PF2miiSIAzU3347A2Af+GE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=OE2e6bh1zc2hyW7XB2OPn7hSQCFYAf0i2wLnF6NplsfwNJ0n1ugriTKAsv4muuCas /6GyKTqlvJGRGUBic2KLDYa2OzDvhyxGoihCKQV/gLSWy5kYsuCUIumgjfQG88+x0A cOtuzQkanT5Byj+JS+/xnGjcwX/IiJ0TXf+k5ikpoQy+QvvtNWfpxJi/0N8cZWl7w0 S4U/fIglv4j08ERb78Nx138w8vy6DszCs8lWfgVoSNUKp2jYVhg0vKlyCc0ldfJ1VE eeOl48dzhnrR2xLj4EfdrizWYAQ53OgzK9asFcV474SfAUdaLQ0/l1l76Hwdmcb0BJ byXSLih/m/LDQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5F67118005D for ; Wed, 26 Jun 2024 12:08:57 +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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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, 26 Jun 2024 12:08:56 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-36701e6c6e8so844090f8f.1 for ; Wed, 26 Jun 2024 05:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seld.be; s=google; t=1719403658; x=1720008458; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=/gj4vAmta+MTxjOMImRKbIF9HxXYHyGtBjpIodpRY0s=; b=RaSmzAwE3PoThRZPy5T4cHQJ6/mG+8NtI6F3Pjf8osoT/P58kenFQy7WNkvUDIEjyG wge7A/2171I4Pol4yoivBIo2KMPdpvL2rlFWjDjHQ6BuanmPnmCERKb4bRfvxC4zv9tL DwfNPI2YObvobO/x/CokGLgCtfBk6TpdLs3YynkIILKFkAYSZjYVmbl9WmIKf2lOQUYF 2QDJDstt+QHN3XC/hLOpcuFurXZajubFXZ1vQDf53ZnsDwFrTRGSXtBS0Cjh4gxE20w5 D7mFI+uIY8nJqHjFM6TruYD8UllIKhZfKW0Oy5EQtW+KLmCkss16oionZm5g3qdebAnv TCmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719403658; x=1720008458; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/gj4vAmta+MTxjOMImRKbIF9HxXYHyGtBjpIodpRY0s=; b=ckLrHFTuFF64ObGqOdwH6T72/KnzVRkU34Btk0s6gOP3x+ublidU0rUIURljDXWJR4 ajuGrmAI1ZvGzrbZs/jvJrQXv4M+R71XMjMlql4d0dqg8Xt80ADXrUwgav8l7c5gIkm6 rhQ45rS+0+V7uAPag9LrtvA9yTL+4LiGcAT0VrWvdhJw7QKyb6lhmCIdKXC3i/C5P/Fe YkBryPyTDeZNMoDoEt8UsiPOXi+/q0i3c/lIkuMzsOgLbjZD33mr1d8UXvT1gYYXq/og s7OY9EjY0ZPHBe267LeOGP13DcuJjelXLiwGoqnDuTg1SJACyXXVj7QC0PsnKlfPqn7A V0GA== X-Forwarded-Encrypted: i=1; AJvYcCVcct3Lz8qQwBMn1Kkf4xqM40Dau7I3DjFVWILhQLuti25xnlirWIQrxyY2GL95MHcKJlUSZwGuYTU5XZjkb737mAtw4lu8lw== X-Gm-Message-State: AOJu0Yyw/wcZQQYr981XKwu1toSv0ivT7+l3+IwFYYa98AHdQqbgOhrw 0Thn7pQapudyD5EANMM6Zt+YLYMQl3KBWqFBnv6GaAFs8WpHD3Rs4DL3N3z7tu9VD/ZnQf6bK14 c X-Google-Smtp-Source: AGHT+IHa1PHw6ahiaTs7u8x8L3ZLm82TjweOxFtTyNHDyWv/d+M8JWx/IhhjiLgPa3uZdQaDvFl4Rw== X-Received: by 2002:adf:fe83:0:b0:363:341:1cf2 with SMTP id ffacd0b85a97d-366e7a1bf24mr7001460f8f.22.1719403657774; Wed, 26 Jun 2024 05:07:37 -0700 (PDT) Received: from ?IPV6:2a02:168:4b6e:0:d59:65f6:ff9c:e7d2? ([2a02:168:4b6e:0:d59:65f6:ff9c:e7d2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3663ada0bdesm15564454f8f.113.2024.06.26.05.07.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jun 2024 05:07:37 -0700 (PDT) Message-ID: Date: Wed, 26 Jun 2024 14:07:37 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Static class To: Bilge , internals@lists.php.net References: Content-Language: fr In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: j.boggiano@seld.be (Jordi Boggiano) On 2024-06-24 01:10, Bilge wrote: >>>> I am pleased to present my first RFC: Static class >>>> . >>> Just one point of feedback: for clarity I think it would be good if >>> it mentions that creating dynamic properties i.e. $this->dynamicProp >>> = 'bar' would also throw at runtime (or even compile time if doable?). >> Absolutely. I'll include a note about this in the RFC. > > On second thoughts, I don't think dynamic properties can apply at all. > The notion of `$this` is a reference to an object instance; static > classes cannot be instantiated, so the concept of dynamic properties > simply cannot exist, and that's really all there is to it 😅 (unless > I'm missing something). Yeah sorry that is indeed not needed as it already works that way https://3v4l.org/TYIiV It is not compile time though, but that's a separate concern. Jordi Boggiano @seldaek - https://seld.be