php比较加赋值语句

$a=-2;
if ($a < 0 && $a = 1) {
echo $a;
}

输出1

右面的$a=1可不是条件哦,而是赋值

原文地址:https://www.cnblogs.com/liuwenbohhh/p/4892209.html