This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
Submitted by Emil Martinell
over 10 years

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.

Answer 52a77b9d8c1ccc71410007c7

1 vote

Permalink

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

points
Submitted by boring12345
over 10 years

1 comments

Emil Martinell over 10 years

Awesome, keep up the good work :)