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 trialdavpay
40,173 PointsCreate an object named "bluegill" that is an instance of our Fish class.
<?php
class Fish {
$bluegill = new Fish();
}
?>
Am I doing something wrong? Bluegill is an object, which is an instance of the Fish class - right?
12 Answers
davpay
40,173 PointsDon't worry, like an idiot I had it stuck in between the parentheses...
Hampton Paulk
5,093 Pointsnot an idiot, just learning... no one is above simple mistakes.
Marius Mirzac
5,970 Points<?php
class Fish {
}
$bluegill = new Fish();
?>
Ceater X
5,434 Pointsthx man :)
davpay
40,173 PointsMove the closing closing curly bracket to the line above $bluegill and it should pass.
Darren Cox
302 PointsIm having the same problem :(
<?php
class Fish {
$bluegill = new Fish(); }
?>
Darren Cox
302 PointsHey tomp ,
Thank you . it was driving me mad haha. I feel stupid now :)
cheers for the help
davpay
40,173 PointsNo worries, it's not easy, this course!
Darren Cox
302 Pointswe will be php ninja's in no time tomp :)
Konrad Pilch
2,435 Pointsxddd
When learning, i think everyone are stupid in the subject thier just learning. Why? because they dont know anythng about it so in suciety thier owul dbe stupid i believe.
When learning somehitng , the more you fail , the better because the more experience you got .
If you keep doing on thing, over 10 year, and the guy says he has 10 years of programming eperience, and the other guy had only 1 year of programming experience, the 10year old guy, has the same level of programming experience x10 . SO thats the same as the new one.
If you want to succeed : failiture and learning comes before success and wealth :)
Keep it up :)
Lal this was over a year ago. You can tell me your story how it went till now :D
Unsubscribed User
Courses Plus Student 16,598 Points<?php
class Fish { }
$bluegill = new Fish();
?>
Betsabeh Yeganeh
3,793 Points<?php class Fish{
} $bluegill = new Fish(); ?>
George Jendeski
1,078 PointsMine works with <?php
class Fish {
}
$bluegill = new Fish();
?>
Craig Watson
27,930 PointsCraig Watson
27,930 PointsI have Joined this exceptional group of individuals that put the code in the parentheses :) Never a prouder moment !
Kennedy Chimwanda
10,237 PointsKennedy Chimwanda
10,237 PointsI clearly got it when you said like an #Idiot... for sure