Single Choice
Not Set
Q Which of the following is/are the right way to declare a method?
(i) function functionName() { function body }
(ii) scope function functionName() { function body }
(iii) method methodName() { method body }
(iv) scope method methodName() { method body }
ID: #2577
Object Oriented Concept of PHP
1,073 views
Question Info
#2577Q ID
Not SetDifficulty
Object Oriented Concept of PHPTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
In case of public methods, you can forgo explicitly declaring the scope and just declare the method like you would a function.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic