It should be noted that typed properties internally are never initialized to a default null. Unless of course you initialize them to null yourself. That's why you will always going to encounter this error if you try to access them before initialization.
**Typed property foo::$bar must not be accessed before initialization**
<?php
class User
{
public $id;
public string $name; public ?string $age = null; }
$user = new User;
var_dump(is_null($user->id)); var_dump(is_null($user->name)); var_dump(is_null($user->age));?>
Another thing worth noting is that it's not possible to initialize a property of type object to anything other than null. Since the evaluation of properties happens at compile-time and object instantiation happens at runtime. One last thing, callable type is not supported due to its context-dependent behavior.