I accidentally saw this writing method on a blog today. I have never used it before and I am not sure what it means. I am here to ask you for advice:
Directly upload the picture:
May I ask everyone:
public function getAllPosts() : Callection
{
// some code
}
How to understand the Callection
after this colon?
php7 的新特性,指定返回数据的类型。。。
和c语言int main(),一样