1.||和&& 的优先级高于 or和and,但作用一样
看下面的列子
<?php $i=true; $j=true; $k=false; if($i || $j and $k) echo "true"; else echo "false"; if($i || ($j and $k)) echo "true"; else echo "false"; ?>
输出:false true
2.输出变量的值和变量名输出,用.来连接字符串
<?php $value="100"; echo $value; echo "$value="."$value"; ?>
3.$err=5/0;会输出错误,但前面加@就不会讲错误显示在页面上
<?php $err=5/0; $err=@(5/0); ?>