This forum is now read-only. Please use our new forums at

610 points
Submitted by
over 3 years ago

Oops, try again. Hey, did you forget add my name as a property to the object? :-P

Why does he say: Oops, try again. Hey, did you forget add my name as a property to the object? :-P

<!DOCTYPE html>
  <title>Reconstructing the Person Class</title>
  <link type='text/css' rel='stylesheet' href='style.css'/>
        class person {
            public $isAlive = true;
            public $firstname;
            public $lastname;
            public $age;

            public function __construct($firstname, $lastname, $age){
                $this->firstname = $firstname;
                $this->lastname = $lastname;
                $this->age = $age;

        $teacher = new Person("Matthias","Bekaert", 20);
        $student = new Person("Maias","Bert", 12);

        echo $teacher->isAlive;
        echo $student->age;

I don't have any errors, so I don't know what I do wrong...

2 votes


You just need to set name, lastname and age for $teacher as stated in the task:

Change your $teacher instantiation to
store new Person("boring", "12345",12345).

So it should be $teacher = new Person("boring","12345", 12345);

674 points
Submitted by
Serge K
over 3 years ago


Ce9d67d67898f2ef2d4e71d81f6cb052?s=140&d=retro MatthiasBekaert over 3 years ago

Thanks! It worked

55061fff9113cbcaab007221_388739080 Islam Sabr over 3 years ago

But this is a bit confusing and though idea. It should accept any value, after finishing this course there will be no need to add your name, you should teach what people need and want to know not vice versa.

2 votes


For anyone else who is having this problem, you should make sure boring is not capitalized.

$teacher = new person("Boring", "12345", 12345);

will not pass, but:

$teacher = new person("boring", "12345", 12345);

630 points
Submitted by
Joshua Paxton
over 3 years ago

-1 votes


Delete this echo "$teacher->isAlive;"

539 points
Submitted by
over 3 years ago