This forum is now read-only. Please use our new forums! Go to forums
Ex.7 Not working.
Why not working?
Oops, try again! It looks like you didn’t print anything!
<?php
class King {
// Modify the code on line 10...
public static function proclaim() {
echo "A kingly proclamation!";
}
}
// ...and call the method below!
King::proclaim();
?>
Answer 5165084223bde46d3b0019fb
Answer 51670aa914138088ad0039df
King::proclaim( );
with a whitespace between the brackets seems to work for me
5 comments
this worked for me as well. Thanks!
not for me :(
yes an extra space between the parentheses works… It worked for me…
This worked for me! Thanks!
Dear codecademy please include. Doodil’s instructions. Thanks!
Answer 516a9bcf1d283e54970048ad
Answer 516e4539e0b1a6590c0042eb
I think the website demands fast internet speed. At home, using my laptop or desktop, when I click save and submit button, the wheel keeps spinning and never proceed further, then many other “bugs” came up . According to speedtest.net, internet speed at home is ~ 5 Mbps At office, using my laptop again, every exercise works, no bug at all. The internet speed at office is > 30 Mbps.
Answer 51f015039c4e9d72da005b9c
Answer 5274bbcaf10c6000d1002e21
my code works try mines
=======================
Answer 52a4364c52f863ce75004d5e
<?php
class King {
// Modify the code on line 10...
public static function proclaim() {
echo "A kingly proclamation!";
}
}
// ...and call the method below!
echo King::proclaim();
?>
It worked when you echo King::proclaim(), that’s if calling it like King::proclaim() doesn’t work of course
Answer 541600d98c1cccd0d40020cc
i have noticed that with PHP code when they say call the method/function they really mean echo the method/function
therefore your [King::proclaim();] should be [echo King::proclaim();] minus the [] other than that i found no errors with your code.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
6 comments
Yep, I have it also.
… but sometimes I get error ‘Oops, try again! It looks like you didn’t print anything!’
I have the same problem??? its just sitting in idle lol
I used “static public function….” and it works..
before you start the lesson, refresh the browser right after you landed in a lesson. and to be sure, copy your code before you hit safe&submit. if it did not work (little white spinning wheel): refresh, paste code, hit safe&submit.
codecademy is aware of the problem for months, they do not seem do get it fixed. my “workaround-strategy” makes the site usable again.
Agreed. I ran exact same code locally on my WAMP stack just fine.