<?php
class Fish
{
public $common_name;
public $flavor;
public $record_weight;
function __construct($name, $flavor, $record){
$this->common_name = $name;
$this->flavor = $flavor;
$this->record_weight= $record;
}
public function getInfo(){
return "A Largemouth Bass is an Excellent flavored fish. The world record weight is 22 pounds 5 ounces." .
$this->common_name .
$this->flavor .
$this->record_weight;
}
}
$bass = new Fish("Largemouth Bass","Excellent","22 pounds 5 ounces");
echo $bass->getInfo();