PHP MCQ Questions and Answers

Practice Mode
Showing 10 of 130 questions
Q71
Which of the following function can assign the output to a string variable
  • A echo ( )
  • B print ( )
  • C print f ( )
  • D s print f ( )
Answer: Option D
Q72
 Which of the following data type is not seal or datetype supported by PHP
  • A Array
  • B String
  • C Float
  • D Boolean
Answer: Option A
Q73
Which of the following data type is compound datatype supported by PHP
  • A Array
  • B String
  • C Float
  • D Boolean
Answer: Option A
Q74
If a boolean variable $ alive= 5;
  • A $ alive is false
  • B $ alive is true
  • C $ alive is overflow
  • D the statement is snot valid
Answer: Option B
Q75
For integer data type PHP 6 introduced
  • A 8 bit integer value
  • B 16 bit integer value
  • C 32 bit integer value
  • D 64 bit integer value
Answer: Option D
Q76
For integer data type PHP 5 and earlier supported
  • A 8 bit integer value
  • B 16 bit integer value
  • C 32 bit integer value
  • D Both Get and Post
Answer: Option C
Q77
<?php $x=array("aaa","ttt","www","ttt","yyy","tttt"); $y=array_count_values($x); echo $y[ttt]; ?>
  • A 2
  • B 3
  • C 1
  • D 4
Answer: Option A
Q78
How do you get information from a form that is submitted using the "get" method?
  • A $_GET[];
  • B Request.Form;
  • C Request.QueryString;
  • D $_POST[];
Answer: Option A
Q79
What's the best way to copy a file from within a piece of PHP?
  • A Print out a message asking your user to "telnet" in to the server and copy the file for you
  • B Open the input and output files, and use read() and write() to copy the data block by block until read() returns a zero
  • C Use the built in copy() function
  • D Use "exec" to run an operating system command such as cp (Unix, Linux) or copy (Windows)
Answer: Option C
Q80
PHP code is embedded directly into XHTML document?
  • A TRUE
  • B FALSE
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test