This is not a "shorthand if". This is the ternary operator. The word itself means "the Trinity" since it consists of 3 parts: the condition, the first branch, the second branch. Displays 1 because !false => true => 1. So echo works in php.
Giles_Luettgen18 answered on July 2nd 19 at 18:31
<?= $id ? 'id =' . Html::encode($id) : "?>
That's the way?
In General, verify the php version :)