rgi*_*gin 5 php terminology
我总是使用这段代码运行一行if语句.
$variable = TRUE; // or anything that evaluates to TRUE $variable && execute_code();
基本上,如果$variable为TRUE ,它将运行该函数.
$variable
我的问题:这样做的正确用法是什么?
sec*_*tus 7
它被称为短路评估.
短路表达x Sand y(使用砂来表示短路品种)等效于条件表达式if x then y else false;的表达式x Sor y相当于if x then true else y.
x Sand y
if x then y else false;
x Sor y
if x then true else y
归档时间:
12 年,4 月 前
查看次数:
132 次
最近记录: