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


2. Which of the following is not a feature of Yii?

A. Yii implements the MVC architectural pattern
B. It is extremely extensible.
C. Yii provides single-tier caching support.
D. Yii provides RESTful API development support.

View Answer


3. The r parameter in the URL stands for ?

A. response
B. route
C. render
D. requires 

View Answer


4. Which folder contains all the third-party packages managed by Composer?

A. Vendor 
B. Views
C. Web
D. Config

View Answer


5. Which folder entry point from web?

A. Tests 
B. View
C. Web
D. Config

View Answer


6. The global constants should be defined at the __________ of an entry script.

A. end
B. beginning
C. middle
D. anywhere in the script

View Answer


7. To create a model, you should extend the?

A. yiiderivedModel class
B. baseModel class
C. derivedModel class
D. yiiaseModel class

View Answer


8. A ________ is a reusable client-side code, which contains HTML, CSS, and JS.

A. Widget
B. Models 
C. Modules
D. Views

View Answer


9. The _______ function should normalize the widget properties.

A. run()
B. render()
C. init()
D. widget()

View Answer


10. To use a widget in a View, you should call the yiiaseWidget::widget() function.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


11. 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


12. Yii manages assets in ?

A. asset blocks
B. asset views
C. asset trigger
D. asset bundles

View Answer


13. 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


14. Which assestbundles Includes the yii.js file?

A. yiiwebJqueryAsset
B. yiiwebYiiAsset
C. yiiootstrapBootstrapAsset
D. yiijuiJuiAsset

View Answer


15. Yii is equipped with a Web-based code generation tool called

A. Yii
B. Gii
C. Zii
D. Cii

View Answer


16. when you write a new widget, which class you are extending?

A. Widget
B. CWidget
C. CForm
D. CControl

View Answer


17. 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


18. To access a database table, we first need to define an AR class by extending

A. CActive
B. ActiveRecord
C. CController
D. CActiveRecord

View Answer


19. 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


20. Cookies are plain text files stored on the client side.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer





Discussion



* You must be logged in to add comment.