Mine
public text v1 · immutable<?php
public class Dog {
private $name;
private $color;
private $breed;
public function Dog($name, $color, $breed) {
$this->name = $name;
$this->color = $color;
$this->breed = $breed;
}
public function getColor() {
return $this->color;
}
}
// some examples
$mydog = new Dog('Rover', 'Red', 'Labrador');
// prints out 'Red'
echo $mydog->getColor();
?>