InterviewMocks : Online Interview Questions
25th
Jul
PHP MCQ

PHP MCQ

  • Admin
  • 25th Jul, 2020
  • 300 Followers

Take PHP Quiz To test your Knowledge 

Below are few PHP MCQ test that checks your basic knowledge of PHP Framework. This PHP Test contains around 12 questions of multiple choice type with 4 options. You have to select the right answer to a question. You can see the correct answer by clicking view answer link.

Also, Read Best PHP interview questions.

PHP MCQ Quiz & Online Test

1) PHP is a ________________________

  • A. Tightly typed language
  • B.Loosely typed language
  • C.Server typed language
  • D.Client typed language

2) _______________ is cocatenation operator in PHP ?

  • A. + (plus)
  • B.. (dot)
  • C.^
  • D.-

3) What does date_sunset() function returns

  • A. Returns the date of sunset for a given day / location
  • B.Returns the time of sunset for a given day / location

4) Which of following is used to add multiple line comments in PHP ?

  • A. //
  • B./* */
  • C.{{ }}
  • D.{/ \}

5) PHP is a case sensitive

  • A. True
  • B.False

6) Which sign is used to access variable of variable in PHP?

  • A. $$
  • B.$
  • C.#@
  • D.$|

7) Which of following is not a Superglobals in PHP?

  • A. $_SERVER
  • B.$_ENV
  • C.$_FILES
  • D.$_PUT

8) Which function is used to get ASCII value of a character in PHP ?

  • A. asc()
  • B.chr( )
  • C.ascii()
  • D.val( )

9) ______ is used to unset a variable in PHP ?

  • A. delete()
  • B.unset()
  • C.unlink()
  • D.delete();

10) How many error levels are available in PHP ?

  • A. 20
  • B.4
  • C.19
  • D.16

11) In which version of PHP E_STRICT Error level is introduced ?

  • A. PHP 4
  • B.PHP 5
  • C.PHP 5.2
  • D.PHP 7

12) Which function in PHP is used to get the length of string variable?

  • A. count()
  • B.strcount
  • C.strlen
  • D.len

13) Which of the below symbols is a newline character?

  • A. \n
  • B.\r
  • C./n
  • D./r

14) Who is the father of PHP?

  • A. Drek Kolkevi
  • B.Rasmus Lerdorf
  • C.Willam Makepiece
  • D.List Barely

15) Type Hinting was introduced in which version of PHP?

  • A. PHP 5
  • B.PHP 5.3
  • C.PHP 4
  • D.PHP 6

16) A function in PHP which starts with __ (double underscore) is known as __________ .

  • A. Inbuilt Function
  • B.Default Function
  • C.Magic Function
  • D.User Defined Function

17) Which of the following PHP functions accepts any number of parameters?

  • A. func_get_args()
  • B.func_get_argv()
  • C.get_argv()
  • D.get_argc()

18) PHP’s numerically indexed array begin with position ___________ .

  • A. -1
  • B.0
  • C.1
  • D.2

19) Which of the functions is used to sort an array in descending order?

  • A. asort()
  • B.sort()
  • C.rsort()
  • D.dsort()

20) Which one of the following property scopes is not supported by PHP?

  • A. public
  • B.final
  • C.friendly
  • D.static

21) What will be the output of the following PHP code ?

  • A. This, was, a, bad, idea
  • B.This was a bad idea
  • C.Thiswasabadidea
  • D.Error

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related Articles

01st
Jul
Laravel MCQ
01st
Aug
React JS MCQ
01st
Jul
AngularJs MCQ
01st
Jul
Node js MCQ
01st
Jul
Angular 2 MCQ
01st
Jul
JSON MCQ