This question already has an answer here:
I just saw this in a Symfony 4 application, and I can't find nowhere what it means
public function findOneBySomeField($value): ?Article
{
return $this->createQueryBuilder('a')
->andWhere('a.exampleField = :val')
->setParameter('val', $value)
->getQuery()
->getOneOrNullResult()
;
}
I know that, now with PHP 7 you can define the expected type of the returned value with ":int $val", but here, what does the ? symbol means ?
</div>