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 trial

PHP Build a Simple PHP Application Wrapping Up The Project Objects

Why my code is not correct? I have preview and seem no error.

Question: What do you think: is 16661 a palprime? Assign the number property of $checker a value of 16661. Be sure to refresh the preview before you finish this step to find out.

System told me: Oops! It looks like Task 5 is no longer passing.

This is a Task 6 question, but the system told me Task 5 is no longer passing... If I not passing Task 5, why can I go to Task 6? I got so confuse......

Moreover, I have no idea what wrong in my answer.

palprimes.php
<?php

require_once('class.palprimechecker.php');

$checker = new PalprimeChecker();

$checker->number = 16661;

echo "The number " . $checker->number;
if($checker->isPalprime()) {
  echo "(is)";
} else {
  echo "is not";
}
echo " a palprime.";

?>

1 Answer

Tim Knight
Tim Knight
28,888 Points

Lionel, everything looks great to me and it works all the way through the question for me using the code that you've provided in your post. Perhaps there was a system issue momentarily? If it's still causing weird errors for you, you might consider contacting support directly at https://teamtreehouse.com/support