PHP Syntax
11. | Which of the following is used to call a function in PHP? |
---|
A. function_name();
B. call function_name();
C. function call(function_name);
D. call(function_name);
View Answer Discuss Work SpaceAnswer: option a
Explanation:
12. | What is the correct syntax to pass arguments to a function in PHP? |
---|
A. function_name(arguments)
B. function_name(arguments;)
C. function_name(arguments,)
D. function_name(arguments);
View Answer Discuss Work SpaceAnswer: option d
Explanation:
13. | Which of the following is used to define a class in PHP? |
---|
A. define class Class_name {}
B. Class Class_name {}
C. new Class Class_name {}
D. class Class_name {}
View Answer Discuss Work SpaceAnswer: option d
Explanation:
14. | Which of the following is used to create an object of a class in PHP? |
---|
A. Class_name = new Class();
B. new Object = Class_name();
C. new Class_name();
D. Object = new Class_name;
View Answer Discuss Work SpaceAnswer: option c
Explanation:
15. | Which of the following is used to access a property of an object in PHP? |
---|
A. object_name->property_name;
B. object_name.property_name;
C. object_name[property_name];
D. object_name->(property_name);
View Answer Discuss Work SpaceAnswer: option a
Explanation: