Sail E0 Webinar

MCQs

Total Questions : 147 | Page 14 of 15 pages
Question 131. The result of below statements will be:
$str
  1.    7
  2.    6
  3.    5
  4.    4
 Discuss Question
Answer: Option A. -> 7
Question 132. PHP recognises constructors by the name . . . . .
  1.    _construct
  2.    __construct
  3.    __constructor
  4.    _constructor
 Discuss Question
Answer: Option B. -> __construct
Question 133. In . . . . . constructors, it is important to remember that you have to call the parent constructor explicitly.
  1.    Singleton
  2.    secure
  3.    public
  4.    subclass
 Discuss Question
Answer: Option D. -> subclass
Question 134. Constructor and destructor methods have no . . . . . . and are called automatically - they cannot be called explicitly and consequently their declarations need no access specifier. 
  1.    parameters
  2.    destructor
  3.    return value
  4.    aproval
 Discuss Question
Answer: Option C. -> return value
Question 135. Unlike constructors, you cannot pass information to a destructor, because you are never sure when its going to be run.
  1.    TRUE
  2.    FALSE
 Discuss Question
Answer: Option A. -> TRUE
Question 136.  . . . . . . is a class which can only be instantiated once. You can effectively only have one object per . . . . . class in an application.
  1.    Constructor, Singleton
  2.    Singleton, Constructor
  3.    Singleton, Singleton
  4.    Loader, Loader
 Discuss Question
Answer: Option C. -> Singleton, Singleton
Question 137. You can invoke class constructors that don’t have any relation to the instantiated object by simply prefacing _constructor with the class name like.
  1.    classname::__construct()
  2.    classname:__construct()
  3.    classname=>__construct()
  4.    classname->__construct()
 Discuss Question
Answer: Option A. -> classname::__construct()
Question 138. Even if you don’t delete the object yourself using . . . . . , PHP still calls the destructor when it determines that the object is no longer used.
  1.    destructor
  2.    del()
  3.    rem()
  4.    unset()
 Discuss Question
Answer: Option D. -> unset()
Question 139. You can overwrite a Singleton with the wrong kind of data. 
  1.    TRUE
  2.    FALSE
 Discuss Question
Answer: Option B. -> FALSE
Question 140. PHP have not yet supported constructor overloading. 
  1.    TRUE
  2.    FALSE
 Discuss Question
Answer: Option A. -> TRUE

Latest Videos

Latest Test Papers