1 | <?php |
||
5 | trait ProvideInfo |
||
6 | { |
||
7 | public function getClientInfo() |
||
11 | |||
12 | public function getHostInfo() |
||
16 | |||
17 | public function getProtoInfo() |
||
21 | |||
22 | public function getServerInfo(Connection $linkIdentifier = null) |
||
28 | |||
29 | public function info() |
||
33 | |||
34 | public function threadId() |
||
38 | |||
39 | public function stat() |
||
43 | |||
44 | public function ping() |
||
48 | } |
||
49 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: