Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRaja Kannan
3,270 PointsAdd the following public properties to the Fish class: common_name, flavor, and record_weight.
how to add the above properties in the class
<?php
class Fish {
$common_name = "man";
$flavor = "watermolon';
$record_weight = "25";
}
?>
1 Answer
Jennifer Nordell
Treehouse TeacherYou're very close on this one! It says to add the public properties. You never stated they were public. Also at "watermolon" you've ended it with a single quote instead of a double quote. I've edited your code here:
<?php
class Fish {
public $common_name = "man";
public $flavor = "watermolon";
public $record_weight = "25";
}
?>