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

Objects in PHP Forum

View Course » View Exercise

762 points
52971a63abf821bd27001d5c_952426013
Submitted by
Emil Martinell
over 3 years ago

Passed and understands, still a question

Code:

class Person {
    public $isAlive = true;
    public $firstname;
    public $lastname;
    public $age;
}
    $teacher = new Person();
    $student = new Person();
        echo $teacher->isAlive;
?>

Question:
isAlive is typed with a captial "A".
The following code is written without the second word starting with a captial letter, "firstname".

Why doesn't it take "firstName" aswell? is it just because it needs to match description, or is there anything to it.

Now if there isn't anything to this beyond following description. I would strongly urge that changed due to possible confusion.

Cheers.


1 vote

permalink

Hello,
thanks for your feedback, I will do so. :-)

3108 points
5154c6cf115b457ac9000021_667301409
Submitted by
boring12345
over 3 years ago

1 Comment

52971a63abf821bd27001d5c_952426013 Emil Martinell over 3 years ago

Awesome, keep up the good work :)