Hi Marco,

Le lun. 2 févr. 2026 à 11:54, Marco Pivetta <[email protected]> a écrit :

> Hey Nicolas,
>
>
> On Thu, 22 Jan 2026 at 16:34, Nicolas Grekas <[email protected]>
> wrote:
>
>> Dear all,
>>
>> Here is a new RFC for you to consider:
>> https://wiki.php.net/rfc/promoted_readonly_constructor_reassign
>>
>
>
> What happens if one calls `$obj->__construct(1, 2, 3)` (on an already
> instantiated `$obj`) in the context of this patch?
>

Thanks for asking, I didn't think about this. This made me also think about
ReflectionClass::newInstanceWithoutConstructor().
I clarified this in the RFC, see "Direct __construct() Calls Cannot Bypass
Readonly" and "Reflection: Objects Created Without Constructor".
Patch and PR updated also if anyone wants to run some code where this RFC
can be played with.

Cheers,
Nicolas

Reply via email to