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 trialJustin Thomas
10,461 PointsWhat palprime object is it asking for?
Task 2 says "This third-party library gives you access to create a PalprimeChecker object. Create a variable called $checker and assign it a new PalprimeChecker object as the value." I have no idea what object it is seeking does anyone know?
<?php
include("class.palprimechecker.php");
$checker ->PalprimeChecker = " ";
echo "The number ## ";
echo "(is|is not)";
echo " a palprime.";
?>
2 Answers
Seth Kroger
56,413 PointsYou create a new object with the aptly named new
keyword followed by the class name called like a function.
$checker = new PalprimeChecker();
Anne Donald
9,847 PointsThanks Seth, that helped me greatly!