31. What is the value of message?
$name = “John”;
$message = ‘Hello, $name’;
$name = “John”;
$message = ‘Hello, $name’;
32. The result of below statements will be:
$str = ""Hello fri3nd, you're
feeling happy today?”;
echo str_word_count($str);
$str = ""Hello fri3nd, you're
feeling happy today?”;
echo str_word_count($str);
33. PHP recognises constructors by the name . . . . .
34. In . . . . . constructors, it is important to remember that you have to call the parent constructor explicitly.
35. Constructor and destructor methods have no . . . . . . and are called automatically - they cannot be called explicitly and consequently their declarations need no access specifier.
36. Unlike constructors, you cannot pass information to a destructor, because you are never sure when its going to be run.
37. You can invoke class constructors that don’t have any relation to the instantiated object by simply prefacing _constructor with the class name like.
38. . . . . . . is a class which can only be instantiated once. You can effectively only have one object per . . . . . class in an application.
39. 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.
40. You can overwrite a Singleton with the wrong kind of data.
Read More Section(Object Oriented Concept)
Each Section contains maximum 100 MCQs question on Object Oriented Concept. To get more questions visit other sections.