PHP considers null is equal to zero

前端 未结 11 2047
眼角桃花
眼角桃花 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:17

    The second solution wouldn't work either. The === operator is the solution to your problem.

提交回复
热议问题