📌  相关文章
📜  ?? ' ' 在 php 代码示例中

📅  最后修改于: 2022-03-11 14:54:25.239000             🧑  作者: Mango

代码示例2
// Null Coalesce Operator - $statement ?? ''
$categoryName = $category->name ?? 'Not Available';

// The above Statement is identical to this if/else statement
if (isset($category->name)) {
    $categoryName = $category->name;
} else {
    $categoryName  = 'Not Available';
}