PHP MCQ Question and Answer

PHP MCQ Question and Answer
1. Trace the odd data type
  • floats
  • integer
  • doubles
  • Real number
Show Answer
2. Which of the folowing are valid float values?
  • 4.5678
  • 4.0
  • 7e4
  • All of above
Show Answer
3. In php string data are
  • delimited by single quote
  • delimited by double quote
  • delimited by <<< identifier
  • All of above
Show Answer
4. Which of the following delimiting method is known as string Interpolation
  • delimited by single quote
  • delimited by double quote
  • delimited by <<< identifier
  • All of above
Show Answer
5. Which datatypes are treaded as arrays

  • Integer
  • Float
  • String
  • Booleans
Show Answer
6. Which of following are compound data type?
  • Array
  • Objects
  • Both
  • None
Show Answer
7. Casting operator introduced in PHP 6 is
  • (array)
  • (int64)
  • (real) or (double) or (float)
  • (object)
Show Answer
8. When defining identifier in PHP you should remember that

  • Identifier are case sensitive. So $result is different than $ result
  • Identifiers can be any length
  • Both of above
  • None of above
Show Answer
9. Identify the invalid identifier
  • my-function
  • size
  • –some word
  • This&that
Show Answer
10.  Which of folowiing variable assignment is 'by value' assignment in PHP

  • $value1= $value?
  • $value1= & $value?
  • $value1= & $value?
  • None
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test