php 7 的新特性

1,类型得声明 可以使用字符串(string),整数(int),浮点数(float)以及布尔值(bool),来声明参数类型和函数返回值 例:declare(strict_types=1);        function add(int $a,int $b): int{                return $a+$b;        }      echo add(1 , 2);    
相关文章
相关标签/搜索