What is Object Orientation
What is Object Orientation
Object oriented is the design philosophy of programs based on encapsulation
Encapsulation is a process whereby data and processing are confined within one class
You can minimize the impact of class changes on outside (out of class)
OOP at PHP
php object Let’s write thought
It is easy to create class objects
Declare the object name as shown below
I will specify the class with new
Then, an object of the specified class is created
$ Object = new class
tarokun object
For example if the human class has already been defined
Object of human class tarokun (Taro)
If you want to create
$tarokun = new human ;
I do not need Kuwait
By the way, when you create objects of class in php
Do not quote a class
Then it will be err
$tarokun = new ‘human’ ; //err