MCQ 1 If there is no error, then what will the error() method return?

Correct Answer Choice C String be empty
See Answer

MCQ 2 Which of the following is a comparison operator in SQL?

Correct Answer Choice B Double equal sign ( == )
See Answer

MCQ 3 Which of the following function returns the sum of the values in an array?

Correct Answer Choice A array_sum()
See Answer

MCQ 4 How many functions are used by PHP to convert between arrays and variables?

Correct Answer Choice B 2
See Answer


MCQ 5 What is right way to Initialize array?

Correct Answer Choice D int num[6] = { 15, 21, 57, 87, 14, 7 };
See Answer

MCQ 6 Which operator is used to select values within a range?

Correct Answer Choice C Between
See Answer

MCQ 7 Which functions returns and caches the size of the file in bytes.

Correct Answer Choice B filesize ( )
See Answer

MCQ 8 What is the use of strlen( ) function in PHP?

Correct Answer Choice B It returns the length of a string
See Answer


MCQ 9 What is the output of the code given.

< ? php
$num = "123";
if (!filter_var($num, FILTER_VALIDATE_INT))
echo("Value of an Integer is not valid");
else
echo("Value of an Integer is valid");
?>

Correct Answer Choice B Value of an Integer is valid
See Answer

MCQ 10 Find Error/Output in follwing code:

< ? php
$usermail = 'knowledge@email.com';
$user = strstr($usermail, '@', true);
echo $user;
?>

Correct Answer Choice A knowledge
See Answer

MCQ 11 How many number of predefined exceptions does SPL provide access to?

Correct Answer Choice D 13
See Answer

MCQ 12 The if statement is used to execute some code only if a specified condition is true.

Correct Answer Choice A True
See Answer


MCQ 13 What will be the output of the following PHP code?

< ?php
function a()
{
function b()
{
echo 'I am b';
}
echo 'I am a';
}
a();
a();
? >

Correct Answer Choice A I am a Error
See Answer

MCQ 14 Which one of the following is the right way to clone an object?

Correct Answer Choice D destinationObject = clone targetObject;
See Answer

MCQ 15 Which magic method is used to implement overloading in PHP?

Correct Answer Choice A  __call
See Answer

MCQ 16 Which feature allows us to call more than one method or function of the class in single instruction?

Correct Answer Choice C Method chaining
See Answer


MCQ 17 The class from which the child class inherits is called as _____________.

  • i) Child class
  • ii) Parent class
  • iii) Super class
  • iv) Base class
  • <

    Correct Answer Choice D ii) and iv)
    See Answer

MCQ 18 Which method is used to tweak an object’s cloning behavior?

Correct Answer Choice B __clone()
See Answer

MCQ 19 Which version of PHP introduced the advanced concepts of OOP?

Correct Answer Choice B PHP 5
See Answer

MCQ 20 If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?

Correct Answer Choice A Abstract class
See Answer


MCQ 21 Which of the following advanced OOP features is/are not supported by PHP?

  • i) Method overloading
  • ii) Multiple Inheritance
  • iii) Namespaces
  • iv) Object Cloning
  • <

    Correct Answer Choice A only i and ii
    See Answer

MCQ 22 Which function will return true if a variable is an array or false if it is not?

Correct Answer Choice D 4
See Answer

MCQ 23 Which function can be used to move the pointer to the previous array position ?

Correct Answer Choice D prev()
See Answer

MCQ 24 An array elements are always stored in ________ memory locations.

Correct Answer Choice C Sequential and Random
See Answer


MCQ 25 Array_splice function is same as array_slice but it starts taking arguments from

Correct Answer Choice A Fourth argument
See Answer

NTSE, NEET, AIEEE, Olympiad & Other Competive Exams Preparation

Publish Your Article / Write for Us

Article Writing Guide/Help

Trending Questions


Advantages Of NCERT, CBSE & State Boards Solutions For All Subjects

  • All the NCERT Solutions have been prepared by academic experts having 10+ years of teaching experience.
  • They have prepared all the solutions in simple and easy language, so that each and every student can understand the concepts easily.
  • All the solutions have been explained step to step wise in details with better explainations.
  • Students can also use these question and answers for your assignments and in homework help.
  • All the solutions have been explained in detail and the answers have been compiled in a step-wise manner.
  • All the question and asnwers are commonly prepared according to the Latest Syllabus of Board Education and Guidelines.
  • Students can know about the various types of questions asked in the exams with the help of these solutions.

Top Course Categories