PHP Build a Basic PHP Website (2018) Adding a Basic Form Objects

What 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?

palprimes.php
<?php
include("class.palprimechecker.php");
$checker ->PalprimeChecker = " ";




echo "The number ## ";
echo "(is|is not)";
echo " a palprime.";

?>

2 Answers

Seth Kroger
Seth Kroger
56,360 Points

You create a new object with the aptly named new keyword followed by the class name called like a function.

$checker = new PalprimeChecker();
Anne Donald
Anne Donald
9,847 Points

Thanks Seth, that helped me greatly!