【PHP】运算符

版权声明:咔咔 来自https://blog.csdn.net/fangkang7 https://blog.csdn.net/fangkang7/article/details/83747995

author:咔咔

wechat:fangkangfk

x && y 如果 x 和 y 都为 true,则返回 true x=6
y=3
(x < 10 && y > 1) 返回 true
x || y 如果 x 和 y 至少有一个为 true,则返回 true x=6
y=3
(x==5 || y==5) 返回 false
! x 如果 x 不为 true,则返回 true x=6
y=3
!(x==y) 返回 true

猜你喜欢

转载自blog.csdn.net/fangkang7/article/details/83747995