This forum is now read-only. Please use our new forums! Go to forums
banner
Close banner
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
Hello, thanks for your feedback, I will do so. :-)
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
Awesome, keep up the good work :)