What is the role of @property in PHP?
I found that after declaring the attribute with @property, the class can also be used, as in the following code! Excuse me, what's the difference between adminName1 and adminName2? is the general declaration attribute used @property?
/**
* @property String adminName1
*/
Class Test {
Private $adminName 2;
Public Function GetName ($pram 1, $pram 2) {
$this->adminname1 = $pram 1;
$this->adminname2 = $pram 2;
}
}
?>
------Solution--------------------
Didn't you see that he was in the comments?
@property string adminName1
Is that the attribute adminName1 is a string
This is just to help understand the program's explanatory text
------Solution--------------------
You go according to its rules. Where does this code come from?
------Solution--------------------
It's been said to help understand the program's explanatory text.
A change like yours
/**
* @property String adminName1
*/
There's no point in explaining it, and there's a misunderstanding.
Obviously he said there is a adminName1 attribute, why didn't I see it? Only see adminName2, is not also to define a adminName1 AH