php shorthand if

I’ve known about the shorthand if for years:

<?php echo ($username) ? $username : ''; ?>

Today If saw this which is called Ternary and has been available since 5.3 which is older than my days of coding….

<?php echo ($username) ?: ''; ?>