php三元运算符?? ?:

版权声明:经验之谈,不知能否换包辣条,另,转载请注明出处。 https://blog.csdn.net/zhezhebie/article/details/86494859
public function testSanYuan()
{
    $d = '12331';
    $e = 0;
    $a = $b ?? $c ?? $d;
    $f = $e ?: $d;
    dd($a, $f);
}

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/zhezhebie/article/details/86494859