PHP Yii MCQ Questions & Answers
Yii MCQs : This section focuses on "Yii" PHP Framework. These Multiple Choice Questions (MCQ) should be practiced to improve the PHP Yii skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Which of the following is true about Yii?
A. The Yii framework is an open-source PHP framework for rapidly-developing, modern Web applications
B. Yii is built around the Model-View-Controller composite pattern
C. Yii provides secure and professional features to create robust projects rapidly
D. All of the above
View Answer
Ans : D
Explanation: The Yii[ji:] framework is an open-source PHP framework for rapidly-developing, modern Web applications. It is built around the Model-View-Controller composite pattern.Yii provides secure and professional features to create robust projects rapidly.
2. The r parameter in the URL stands for ?
A. response
B. route
C. render
D. requires
View Answer
Ans : B
Explanation: The r parameter in the URL stands for route. The route's default format is controllerID/actionID.
3. Which folder entry point from web?
A. Tests
B. View
C. Web
D. Config
View Answer
Ans : C
Explanation: Web : The entry point from web.
4. To create a model, you should extend the?
A. yiiderivedModel class
B. baseModel class
C. derivedModel class
D. yiiaseModel class
View Answer
Ans : D
Explanation: To create a model, you should extend the yiiaseModel class or its subclasses.
5. The _______ function should normalize the widget properties.
A. run()
B. render()
C. init()
D. widget()
View Answer
Ans : C
Explanation: The init() function should normalize the widget properties.
6. A ________ is an entity that has its own models, views, controllers, and possibly other modules.
A. Widget
B. Module
C. Models
D. Views
View Answer
Ans : B
Explanation: A module is an entity that has its own models, views, controllers, and possibly other modules. It is practically an application inside the application
7. Which of the following is true about External Assets?
A. The assets are located in a web accessible directory
B. The assets are located in the directory that cannot be directly accessed via web.
C. The assets are located on another web server.
D. None of the above
View Answer
Ans : C
Explanation: External Assets : The assets are located on another web server.
8. Yii is equipped with a Web-based code generation tool called
A. Yii
B. Gii
C. Zii
D. Cii
View Answer
Ans : B
Explanation: Yii is equipped with a Web-based code generation tool called Gii.
9. Which represents a query criteria, such as conditions, ordering by, limit/offset?
A. Query
B. CQuery
C. CDbCriteria
D. None of the above
View Answer
Ans : C
Explanation: CDbCriteria represents a query criteria, such as conditions, ordering by, limit/offset
10. The asset manager in Yii converts assets in extended syntax into CSS and JS, automatically.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, The asset manager in Yii converts assets in extended syntax into CSS and JS, automatically.
Discussion