Objects
name = $name; $this->rank = $rank;
}
function report() {
echo "My name is ".$this->name;
echo " and my rank is ".$this->rank;
}
};
$me = new Foo("GI Joe", "Private");
$me->report();
?>');?>
Output:
name = $name; $this->rank = $rank;
}
function report() {
echo "My name is ".$this->name;
echo " and my rank is ".$this->rank;
}
};
$me = new Foo("GI Joe", "Private");
$me->report();
?>