Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123790 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 83A4B1A009C for ; Mon, 24 Jun 2024 21:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719263755; bh=KQhuYASSS321WEdE8dxqyGyGR9GqMwioW3Rd2kGn60M=; h=Date:Subject:From:To:References:In-Reply-To:From; b=jBEpIY3FCWsUZCyDdHUkrKUj+KbJRdiYBye7H2BBYjmzoazuTIYlBIXYhIRX9kuSs SIMSqtluCm+Ch5rbfMXsCFJtewBVncC6SHUSFItFC1/p/A3IPJZoQUc0tcO2elzA/D Fvtns92GLHCn2VGHxA+pgKHclzJbzEc5WJH7X9Kl9Ju5DMKBXnvhXmhRSba20SgRWT t9oTZXpRBYCiOt9v9rchaS1HgErw+F26+78RaU8U6Wa3JG8Z5QmiB0bjkgt1/s6s5T 8BsHUdK+6kCksP1haozaV+et/Uv7ISvOnoqGKzURVmdT7ArnCaDRFbxx4Wl9bneafl Pml8Fvj4Y7VhQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D89DE1801EE for ; Mon, 24 Jun 2024 21:15:54 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,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-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 X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 24 Jun 2024 21:15:54 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-421d32fda86so53170235e9.0 for ; Mon, 24 Jun 2024 14:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scriptfusion-com.20230601.gappssmtp.com; s=20230601; t=1719263676; x=1719868476; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=fZfYI1WuAZUyQUFrinDzHw6t9VNZaDtK68wsqE315jk=; b=GNkNelwXDk5846otqBYDy7AtvQgdoes+pZmxjz8NaUgTwLCcRRpHYQPS5mOOFsbgyf df1HPF7yxOXuU1vtGIDakVz5Ti++DgaeXLL9bguKa4K2jWGU12K5fa+TgNBy3l3deqFA mShAE9/0vzNfNGYl1DJPUs8eDrPUfC0i5fcSsT7wn/vn0cBdgH5BNkTutEdhtH3Rx144 J6mSrgYlGfy5ocSWsRGeBPWwoUmk2N/TXYHyl3GmRImVEr60dIWRbCqfpXA3Xch439gc nARV426S2IiD88ovq30Ig6lEpTbJA3FOVapsab4b7tm+QoNAhwoC6CY3uRoc2uU1/8US 6ZwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719263676; x=1719868476; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fZfYI1WuAZUyQUFrinDzHw6t9VNZaDtK68wsqE315jk=; b=CRUQXRg/m9xDcmRlTikdjR2FBmjGlR+7R3Gy5fR3t9jbngIkF35LZiQcUAv1E3It4h fUFFU7J2NUwXBnOlAyVp72BFKezKHtaXt+bWCgFFGsHVYhJHSF5yGKRkD2zak6JmJMsE t6VXprfipJt2r+JiaA+lEHzSUIW1STwUnF6dTQt5uXQFIE1rlvmzjgmwpKxwBC1PG32+ FRMMUCR7KcxG7nEHv+BXR0XYk6mhhsioqLxaNz+ANxRZQMvkl75cNSqeiGcyfyEWoGIn mklIWbs11h9gJEhCKs9Swm9rcniDzcOCuK3vyiAAGUx+QlMwALZLaWE5QMWi6D552lr8 kM2Q== X-Gm-Message-State: AOJu0YzWEclZyB7HVioUdjdsEBlzw7fBVxHJRIMaMlCPspRK63MIjE3S 9V68Jr8o0Xri64vkSRemEm9tVM11+0J8kPjDCGhiLtGubfREjUziQlJNTCzAe30vIF6yVci7Awp LsHI= X-Google-Smtp-Source: AGHT+IHI12FwEPD4CpEz2enHHeWxXv+beapgYQ2xhWT21AXZCERSdmfAvsqRahurcmMerFn//DBdzQ== X-Received: by 2002:a05:600c:3146:b0:422:6755:17de with SMTP id 5b1f17b1804b1-4248cc73dd6mr48629965e9.41.1719263676633; Mon, 24 Jun 2024 14:14:36 -0700 (PDT) Received: from ?IPV6:2a01:4b00:bf09:5101:7168:677:94f9:b75d? ([2a01:4b00:bf09:5101:7168:677:94f9:b75d]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-424817b6121sm147253385e9.27.2024.06.24.14.14.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jun 2024 14:14:36 -0700 (PDT) Message-ID: Date: Mon, 24 Jun 2024 22:14:34 +0100 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: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: bilge@scriptfusion.com (Bilge) Hi again Jordi, On 24/06/2024 21:21, Bilge wrote: > Hi Jordi, > > On 24/06/2024 13:22, Jordi Boggiano wrote: >> 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). Cheers, Bilge