在PHP 7 版本之前,?: 這種寫法稱為,「Ternary Operator」:$data = isset($data) ? $data : 'hello'; PHP 7 之後,??這種寫法稱為「Null Coalescing Operator」:$data = $data ?? 'hello';可以不用多判斷isset PHP 7.4 之後寫法更簡潔,??=這種寫法稱為「Null Coalesce Assignment Operator」:$data ??= 'hello'; 本筆記參考:1. https://stackoverflow.com/questions/59102708/what-is-null-coalescing-assignment-operator-in-php-7-42. https://caloskao.org/php-null-coalescing-operator/