<?php
$callable = fn() => throw new Exception();
$myValue = true;
$value = $myValue ? 'something' : throw new Exception();
$value = $myValue ?: throw new Exception();
$myValue = false;
$value = $myValue ? throw new Exception() : 'something';
$nullableValue = 1;
$value = $nullableValue ?? throw new Exception();
$value = true;
$value ??= throw new Exception();
$condition = false;
$condition && throw new Exception();
$condition and throw new Exception();
$condition = true;
$condition || throw new Exception();
$condition or throw new Exception();
// $condition xor throw new Exception();
echo 'still executable as throw, in all of the above cases, is used as part of an expression';