PHP considers null is equal to zero

前端 未结 11 2042
眼角桃花
眼角桃花 2020-12-05 12:50

In php, ($myvariable==0) When $myvariable is zero, the value of the expression is true; when $myvariable is null, the value of this expression is also true. How

11条回答
  •  鱼传尺愫
    2020-12-05 13:06

    For my case i found this soulution and it works for me :

    if ($myvariable === NULL) {
        codehere...
    }
    

提交回复
热议问题