In some languages, you can do
$a = $b OR $c OR die(\"no value\");
That is, the OR will short-circuit, only evaluating values from left to right
You can use just:
$a = func1() or $a = func2() or $a = func3();
or am I missing something?