Hi
Am 2026-06-29 21:07, schrieb Tim Düsterhus:
Am 2026-06-29 02:17, schrieb Rob Landers:
I'd like to put forward Primary Constructors
<https://wiki.php.net/rfc/primary-constructors> for comment.
The RFC currently does not specify the interaction with visibility. It
is currently implied that the constructor will be `public`, but the RFC
doesn't spell that out and doesn't specify whether or not it is
possible to make such a constructor non-public (e.g. to actually treat
it as a “primary constructor” in a sea of multiple named constructors).
The RFC also doesn't specify whether the parent constructor call
supports named arguments:
class P(public string $foo, public string $bar) { }
class C(string $bar, string $foo) extends P(bar: $bar, foo: $foo) {
}
Best regards
Tim Düsterhus