-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoops.php
More file actions
37 lines (29 loc) · 692 Bytes
/
oops.php
File metadata and controls
37 lines (29 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
class Car{
private $brand = "Volvo";
private $name;
private $color = "Green";
public $vehicleType = "car";
public function __construct($name){
$this->name = $name;
}
public function getCarInfo(){
return "Brand" . $this->brand . "Color" . $this->color;
}
public function getBrand(){
return this->brand;
}
public function setBrand(){
$this->brand = $brand;
}
public function getColor(){
return this->color;
}
public function setBrand(){
$this->color = $color;
}
}
$Car01 = new Car("CRETA");
$Car02 = new Car("BMW");
echo $Car01->vehicleType;
echo $Car01->getCarInfo();