- Output for 8.2.29, 8.3.5 - 8.3.26, 8.4.7 - 8.4.13
- Email address is foo@example.com
<?php
function getUserEmail(): ?string { return 'foo@example.com'; }
function sendEMail(string $email) { echo "Email address is $email"; }
sendEmail( getUserEmail() ?: throw new Exception("Email required") );