Having this example code using the tertiary operator in PHP, I get the 'default value'.
$myObject = null; // I'm doing this for the example
$result = $myObject ? $myObject->path() : 'default value';
However, when I try to use the null coalescing operator to do this, I get the error
Call to a member function path() on null
$result = $myObject->path() ?? 'default value';
What am I doing wrong with the ?? operator?