Re: RFC: short and inner classes
| From: | Juris Evertovskis | Date: | Thu, 06 Mar 2025 12:49:49 +0000 |
| Subject: | Re: RFC: short and inner classes | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126603@lists.php.net to get a copy of this message | ||
On 2025-03-06 10:04, Tim Düsterhus wrote:
- I don't understand the use of private properties. Given that the
classes cannot have methods, they would be inaccessible, no?
I think the RFC was a bit unclear on this. Short classes can have methods. The short syntax just doesn't provide the ability to define them whilst defining the class.
But otherwise they are indistinguishable from normal classes and they can have methods by inheriting them or by using traits.
BR,
Juris