A readonly property can only be initialized once, usually in the constructor, and can no longer be modified afterwards. It makes the object immutable, which limits side effects. It requires a declared type, and an entire class can be readonly since PHP 8.2.
Example
public function __construct(
public readonly string $id,
) {}