<?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