Beruflich Dokumente
Kultur Dokumente
D. object_clone()
Answer: B
(ORI: http://www.sanfoundry.com/php-questions-answers-advanced-object-orientedphp/)
9. Which feature allows us to call more than one method or function of the class in
single instruction?
A. Typecasting
B. Method Including
C. Method adding
D. Method chaining
Answer: D
(ORI: http://www.sanfoundry.com/php-questions-answers-advanced-object-orientedphp/)
10. Which magic method is used to implement overloading in PHP?
A. __call
B. __invoke
C. __wakeup
D. __unset
Answer: A
(ORI: http://www.sanfoundry.com/php-questions-answers-advanced-object-orientedphp/)
11. Which method scope prevents a method from being overridden by a subclass?.
A. Abstract
B. Protected
C. Final
D. Static
Answer: C
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
12. Which of the following statements is/are true about Constructors in PHP?
i) PHP 4 introduced class constructors.
ii) Constructors can accept parameters.
iii) Constructors can call class methods or other functions.
iv) Class constructors can call on other constructors.
A. ii) and iii)
B. All of the mentioned
C. None of the mentioned
D. ii), iii) and iv)
Answer: B
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
13. PHP recognizes constructors by the name.
A. classname()
B. _construct()
C. function _construct()
D. function __construct()
Answer: D
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
14. Which version of PHP introduced the instanceof keyword?
A. PHP 4
B. PHP 5
C. PHP 5.3
D. PHP 6
Answer: B
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
15. Which one of the following functions is used to determine whether a class exists?
A. exist()
B. exist_class()
C. class_exist()
D. __exist()
Answer: C
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
16. Which one of the following functions is used to determine object type?
A. obj_type()
B. type()
C. is_a()
D. is_obj()
Answer: C
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
17. Which one of the following keyword is used to inherit our subclass into a superclass?
A. extends
B. implements
C. inherit
D. include
Answer: A
(ORI : http://www.sanfoundry.com/php-questions-answers-basics-of-object-orientedphp-2/)
18. In the PHP code given below, what is/are the properties?
<?php
class Example {
public $name;
function Sample(){
echo "This is an example";
}
}
?>
A. True
B. False
Answer: B
(ORI : http://techtalim.blogspot.co.id/2016/04/yii-mcq-questions-with-answer-foridb.html)
22. The prefix of any method name of a controller is
A. function
B. method
C. action
D. index
Answer: C
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
23. A filter can also be an instance of
A. CFilter
B. CController
C. CDatabase
D. CModel
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
24. Which models are used to store data collected from user input?
A. Active Record Model
B. Form Model
C. Widget
D. CModel
Answer: B
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
25. To create a text input field, we can call
A. CHtml::textField();
B. CForm::textField()
C. CModel::textField()
D. $form->textField
Answer: D
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
D. readByPk()
E. E. findByAttributes()
Answer: A, B, E
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
31. Which is correct ?
A. Chtml::Error()
B. CHtml::error()
C. form->error()
Answer: C
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
32. Which is correct ?
A. $form->hiddenField()
B. CHtml ->hiddenField()
C. CHtml:: hiddenField()
D. none of the above
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
33. Which is correct ?
A. $form-> submitButton ()
B. CHtml -> submitButton ()
C. CHtml::submitButton()
D. none of the above
Answer: C
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
34. Which represents a query criteria, such as conditions, ordering by, limit/offset?
A. Query
B. CDbCriteria
C. CQuery
Answer: B
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
35. AR Meaning
A. Auto Read
B. Active Rules
C. All Records
D. Active Records
Answer: D
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
36. ____method use to delete a row of data ?
A. delete()
B. remove()
C. truncate()
D. All of them
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
37. The validation is based on the rules specified in the ______method of the AR class?
A. rules()
B. Validation()
C. Check()
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
38. when you createa new object of widget class, what is you have to write?
A. Widget
B. CWidget
C. $this->beginWidget()
D. $this->Widget()
Answer: C
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
39. What is the first parameter of widget object
A. CActiveForm
B. id
C. htmlOptions
D. enableAjaxValidation
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
40. By default Ajax Validation is false
A. Right
B. Wrong
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
41. Yii is equipped with a Web-based code generation tool called
A. Yii
B. Gii
C. Zii
D. CI
Answer: B
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
42. Which keyword allows class members (methods and properties) to be used without
needing to instantiate a new instance of the class?
A. CUserIdentity
B. CUserAuthentication
C. UserIdentity
Answer: A
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
43. UserIdentity class is located at
A. protected\extention
B. protected\controller
C. protected\components
Answer: C
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
44. Which is correct
A. this->Error_Username_Invalid
B. this->ERROR_USERNAME_INVALID
C. self:: error_username_invalid
D. self::ERROR_USERNAME_INVALID
Answer: D
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
45. By default Yii has only one demo user
A. true
B. false
Answer: B
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
46. Only digit are support in text field for this which validation rules have to apply
A. alphanumeric
B. integer
C. numeric
D. numerical
Answer: D
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
47. Where you have to define the relations method
A. controller
B. view
C. module
D. components
E. None of the above
Answer: E
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
48. What is correct?
A. public $layout='/layouts/aaa;
B. public $layout='//layouts/aaa/;
C. public $layout='/layouts/aaa/;
D. public $layout='//layouts/aaa;
Answer: D
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
49. By which symbol in access rule define only login user can access an action
A. *
B. @
C. #
D. none of the above
Answer: B
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)
50. Which method is incorrect
A. $this->render
B. $this->renderPartial
C. $this-> loadModel
D. $this-> performAjaxValidation
E. $this->Validation
Answer: E
(ORI : https://asamamun.wordpress.com/2015/03/28/test-your-knowledge-in-yii-mcqquiz/)