<?php
class ðŸ¥ƒwhisky
{
    public    
string     $name;
    private   
int        $age;
    public    
Distillery $distillery;
    private   ?
Bottler   $bottler;
}

$whisky = new ðŸ¥ƒwhisky;
$whisky->distillery "Lagavullin";
?>

TypeError: Typed property 🥃whisky::$distillery must be an instance of Distillery, string used



Type validation is checked when writing