ホーム

What is Object Orientation

0
0

 

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

 

Pocket
LinkedIn にシェア

  • この記事を書いた人
  • 最新記事

藤沢瞭介(Ryosuke Hujisawa)

りょすけと申します。18歳からプログラミングをはじめ、今はフロントエンドでReactを書いたり、AIの勉強を頑張っています。off.tokyoでは、ハイテクやガジェット、それからプログラミングに関する情報まで、エンジニアに役立つ情報を日々発信しています!

-ホーム

Copyright© off.tokyo , 2021 All Rights Reserved Powered by AFFINGER5.