393. bakura
(Off)
[ 18 Oct 2020, 10:28 ]
<?php
class Car {
public $color;
public $model;
public function __construct($color, $model) {
$this->color = $color;
$this->model = $model;
}
public function message() {
return "ჩემი მანქანა არის " . $this->color . " " . $this->model . "!";
}
}
$myCar = new Car("შავი", "BMW");
echo $myCar -> message();
echo "<br>";
$myCar = new Car("წითელი", "ტოიოტა");
echo $myCar -> message();
?>
[Pasuxi][Cit]|