Typed properties and possible errors

Code
<?php

declare(strict_types=1);

class Foo
{
    public int $id;
    public string $name;
}

try {
$foo = new Foo();

// Wrong type
try {
    $foo->id = 'text for integer type';
} catch (Error $e) {
    dump($e->getMessage());
}

// Some unset properies
$foo->id = 1;
try {
    echo $foo->name;
} catch (Error $e) {
    dump($e->getMessage());
}

// callable
$foo->name = '5';

try {
$foo->func = function () {
    echo 'Hello world.';
};

($foo->func)();
} catch (Error $e) {
    dump($e->getMessage());
}

} catch (Throwable $e) {
    dump($e->getMessage());
}
Result
^ "Cannot assign string to property Foo::$id of type int"

^ "Typed property Foo::$name must not be accessed before initialization"

Hello world.
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8