MCQ question PHP

MCQ question PHP:- Hi Readers, In this tutorials, we have some objective questions on PHP to prepare fresher for grab jobs and it also helps them to check knowledge on PHP.I have Mentioned 15 Multiple Choice Question of PHP with their answers.Every answer of MCQ question PHP is marked with bold.Each MCQ on PHP has four options and one of them is true.Here we start topic on  MCQ question PHP

MCQ question PHP (Multiple Choice Question of PHP with answer)

1.PHP is …….?

A.Server side scripting language.

B.client side

C.both side

D.None of the above

2.USE of echo in PHP?

A.to print string

B.to call Function

C.To define Constant

D.None of the above

3.PHP stands for

A.Hypertext Preprocessor

B.Hypertext Postprocessor

C.Hyper past

D.None of the above

4.PHP Scripts tag syntax are :-

A.<?p  ?>

B.<?php ?>

C.</pgp ?>

D.None of the above

5.In PHP, every statement are ended with

A.:-

B.;

C.+

D.-

6.How can we declare a variable global using which keyword?

A.static

B.common

C.global.

D.NOT

7.which keyword is used to define constant in PHP

A.contant

B.define();

C.clear

D.NOT

8.How to assign a variable in PHP?

A.$a=4;

B.#a=4;

C.*a=4;

D.@==4;

9.How can we declare an array in PHP?

A.$arr = array(‘ap’, ‘gr’, ‘le’);

B.$aa=(‘c’,’c’,’c’);

C.$array=arr(‘c’,’c’,’c’);

D.ALL above

10.Which function is used to count elements in array or object in PHP?

A.Count()

B.Number()

C.IScount()

D.NONE of above

11.How can we include a file in PHP?

A.<?php include(‘file.php’);?>

B.<?php copy(‘file.php’);?>

C.<?php add(‘file.php’);?>

D.NONE of above

12.Which function is used to start a session in PHP?

A.session_add();

B.session_start();

C.start();

D.All of the above

13.In PHP, How we can create a function or syntax to create or define a function?

A.<?php  function functionName() { ………}  ?>

B.<?php  fun functionName() { ………}  ?>

C<?php   functionName() { ………}  ?>

D.<?php  function () { ………}  ?>

I hope you would like this session on  MCQ question PHP -SET 1

Leave a Comment