Skip to content

JehanKandy/OOP-in-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OOP-in-PHP

PHP Object-Oriented Concepts

Explanation

the OOP in php is PHP Object-Oriented Concepts

in the file class.php

in first code lines i create a class called car{} with 3 properties $color, $brand and number

class car{
    public $color;
    public $brand;
    public $number;

and the i create 6 methods of access the above 3 properties,

  1. set_color($color) , get_color()

     function set_color($color) {
         $this->color = $color;
     }
    
     function get_color(){
         return $this-> color;
     } 
    

for set the car color and get th color of car

About

PHP Object-Oriented Concepts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages