Medium
What will be displayed?
<?php
class User
{
public string $name = 'Doe';
}
class Article
{
public ?User $user = null;
}
$article = new Article;
echo $article?->user?->name;
Author: W3D TeamStatus: PublishedQuestion passed 794 times
Edit