在PHP7,一个新的功能,返回类型声明已被引入。返回类型声明指定的一个函数返回值的类型。
- int
- float
- bool
- string
- interfaces
- array
- callable
- 对象实例
参考:https://www.runoob.com/php/php-scalar-return-type.html
在PHP7,一个新的功能,返回类型声明已被引入。返回类型声明指定的一个函数返回值的类型。
参考:https://www.runoob.com/php/php-scalar-return-type.html
相关文章: