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 trialNobody Tebulo
13,233 PointsIt looks like Task 1 is no longer passing.
objects
<?php
include"class.palprimechecker.php";
$checker=new PalprimeChecker(number=17);
echo "The number $checker ";
echo "(is|is not)";
echo " a palprime.";
?>
1 Answer
Matthew Caloger
12,903 PointsYou'll need to use the following:
<?php
include('class.palprimechecker.php');
$checker = new PalprimeChecker();
$checker->number = 17;
echo "The number" . $checker->number;
echo "(is|is not)";
echo " a palprime.";
?>
remove the "number=17" from the constructor of the PalprimeChecker, and add a new line with "$checker->number = 17;" $name -> value allows you to access a property and assign a value. In the echo, you'll want to use "." to concatenate, then "$checker->number" to retrieve the number.