PHP MCQ Questions and Answers

Practice Mode
Showing 10 of 130 questions
Q11
Identify the variable scope that is not supported by PHP
  • A Local variables
  • B Function parameters
  • C Hidden variables
  • D Global variables
Answer: Option C
Q12
Variable scope on which a variable does not loose its value when the function exists and use that value if the function is called again is:
  • A Local
  • B function parameter
  • C static
  • D None of above
Answer: Option C
Q13
The left association operator % is used in PHP for
  • A percentage
  • B bitwise or
  • C division
  • D modulus
Answer: Option D
Q14
The left associative dot operator (.) is used in PHP for
  • A multiplication
  • B concatenation
  • C separate object and its member
  • D delimeter
Answer: Option B
Q15
Trace the false statement
  • A Any code found within an included file will inherit the variable scope of the location of its caller
  • B Because the included code will be embedded in a PHP execution block, the PHP execution block, the PHP escape tags (<?php?> Wink aren't required on the file to be included
  • C For the inclusion of remote files the allow-url-pope must be enabled ad URL wrapper must be supported
  • D Including a file produces the same result as copying the data from the file specified into the location in which the statement appears.
Answer: Option B
Q16
Which of the following functions require the allow-url-fopen must be enabled?
  • A include()
  • B require()
  • C both of above
  • D None of above
Answer: Option C
Q17
Which function includes the specified file even the statement evaluates to false in which block the function is&nbsp; placed.
  • A include ()
  • B require ()
  • C both of above
  • D None of above
Answer: Option B
Q18
On failure of which statement the script execution stops displaying error/warning message?
  • A rinclude ()
  • B require ()
  • C both of above
  • D None of above
Answer: Option B
Q19
Trace the function that does continue the script execution even if the file inclusion fails
  • A include ()
  • B require ()
  • C both of above
  • D None of above
Answer: Option A
Q20
&nbsp;A script is a
  • A Program or sequence of instructions that is interpreted or carried out by processor directly
  • B Program or sequence of instruction that is interpreted or carried out by another program
  • C Program or sequence of instruction that is interpreted or carried out by web server only
  • D None of above
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test