". $bike = new Bicycle(); $bike->color = 'Blue'; echo $bike->color . "\n"; // A method is a function attached to the class. You can add a method // to a class by using the "public" keyword followed by the function. A method // can access the attributes and methods of the instance using the "$this" variable. class Tricycle { public $color; public function echoColor() { echo $this->color . "\n"; } } $bike = new Tricycle(); $bike->color = 'Red'; $bike->echoColor();