Hard
What will be displayed?
<?php
class User
{
public string $name = 'Doe';
}
class Article
{
public ?User $user;
}
$article = new Article;
$article->user = new User;
$article?->user?->name = 'Dupont';
echo $article->user->name;
Author: W3D TeamStatus: PublishedQuestion passed 761 times
Edit
2
Community Evaluations