PHP-Access Control
Public Access property, without any access restrictions
Private Access property, accessible only within the class
Protected protected access properties that can be accessed only in this class or subclass or in a parent class
PHP-Magic Method
__construct () constructor: Used when object is initialized (called when new)
__destruct () destructor: Object destruction using (automatic invocation), meaning: When the object is destroyed, release other resources
__tostring () __tostring () automatically calls when the object is converted to a string
__invoke () __invoke () automatically calls the object when it is called as a method
__call () The __call () method is automatically called when an object accesses a method name that does not exist
Static __callstatic () when an object accesses a static method name that does not exist, the __callstatic () method is automatically called
__get () When reading the value of an inaccessible property, __get () is called
__set () __set () is called when a value is assigned to an unreachable property
__isset () when isset () or empty () is called on an inaccessible property, __isset () is called
__unset () __unset is called when unset () is called on a non-accessible property
PHP-Object Oriented