" symbol after new comes out, with codes such as "$a ->index();"."/> " symbol after new comes out, with codes such as "$a ->index();".">
Home > Article > Backend Development > php method of calling object
php Call the method of the object
php Call and introduce the object
Directly go to the instance :
Definition:
"; echo 555; } }
Usage:
b(); $a = new a(); $a ->index(); echo $a::$q; $a::debug();
In PHP, for object properties (non-static) and methods (non-static), use "new" after coming out -> "This is consistent with access. Unlike other languages, use "." directly after new to access.
To access static data, use the "::" symbol to access it.
For more PHP related knowledge, please visit PHP Chinese website!
The above is the detailed content of php method of calling object. For more information, please follow other related articles on the PHP Chinese website!