PHP7新增运算符

1、新增运算符 1.1、飞船运算符<=> a<=>b;a大于b返回1,等于返回0,小于返回-1 1.2、合并运算符?? $a=b??c;b若为真,$a=b,否则,$a=c,相当于$a = (b==true? b : c) 2、强制函数参数和返回值类型 function get(int $a,int $b):float{ return $a+$b; }

猜你喜欢

转载自www.cnblogs.com/chuanzi/p/10357648.html