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 trialSunzuiana Marius Ovidiu
143 PointsI create a class called fish, after that it requires to create an object called bluegill as an instance to classFish.How
I have to create an object called bluegill as an instance to class Fish
When I go to checkwork the program tells me that I have some problems because bluegill is not an instance to class Fish or something like that. What should be the correct line code ?
<?php
class Fish
{
}
$fish=new fish();
var_dump($fish1);
3 Answers
Cindy Lea
Courses Plus Student 6,497 Points<?php
class Fish { }
$bluegill = new Fish();
Sunzuiana Marius Ovidiu
143 PointsThank you ! :)
Matthew OToole
22,946 Points$fish1 hasn't been defined. Presumably that was a typo?