Re: [RFC] Constructor Property Promotion

From: Date: Wed, 08 Apr 2020 11:56:43 +0000
Subject: Re: [RFC] Constructor Property Promotion
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-109562@lists.php.net to get a copy of this message
> I would like to submit the following RFC for your consideration: > https://wiki.php.net/rfc/constructor_promotion > I love it :) Just one question: Shouldn't default values be copied on the signature? That would be expected for me. (and that would make the properties still initialized when child classes don't call the parent constructor for whatever reasons.) class Point { public function __construct( public float $x = 0.0, <==> class Point { public float $x = 0.0; public function __construct( float $x = 0.0, Nicolas

« previous php.internals (#109562) next »