What does @param mean in a class?

前端 未结 5 1898
情歌与酒
情歌与酒 2020-12-29 03:46

What does the @param mean when creating a class? As far as I understand it is used to tell the script what kind of datatype the variables are and what kind of value a functi

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 04:06

    I know this is old but just for reference, the answer to the second part of the question is now, PHP7.

    // this function accepts and returns an int
     function age(int $age): int{
    
      return 18;
    }
    

提交回复
热议问题