PHP shorthand for isset && truthy

4 weeks ago 26
ARTICLE AD BOX

Is there a shorter way to write the following in php?

$bar = isset($foo['bar']) && $foo['bar'];

or

$verylongname = isset($_POST['verylongname']) && $_POST['verylongname'];

I'm using php 8.4

Read Entire Article