Thisselfparent in php
This is a pointer to an object instance. it is determined to point to it during instantiation;
Self is a reference to the class itself and is generally used to point to static variables and constants in the class;
Parent is a reference to the parent class. it is generally used to call the constructor of the parent class.
You must use self to call static members in a class (generally with the keyword static. To use self to call static variables, you must use: (domain operator number ).
Static keywords describe that a member is static and can only be accessed using the class name and self:. The value can be changed. you need to add the $ symbol when defining the member. you can use the modifier such as private.
Const is used for defining constants of class members. it can only be accessed by class name and self:. The value cannot be changed. Generally, the variable name must be in upper case during definition, and no modifier such as private can be added.
Private static $ count = 0; // define a static attribute const VERSION = 2.0; // define a constant
Reference URL: