<?php readonly class Foo { public function __construct( public int $id, public string $name, ) { } } $foo = new Foo(1, 'foo'); $foo->id = 2; var_dump($foo);
You have javascript disabled. You will not be able to edit any code.