PHP MCQ Questions with Answers Download PDF – PHP Programming Language

PHP Programming Language MCQ Questions Answers – Download 100+ PHP Objective Questions and Answers PDF. Free Study materials for PHP Language.

1) PHP is an example of ___________ scripting language.

A) Server-side

B) Client-side

C) Browser-side

D) In-side

View Answer
Option – A.

2) Which of the following method sends input to a script via a URL?

A) Get

B) Post

C) Both

D) None

View Answer
Option – A.

3) Who is the father of PHP?

A) Rasmus Lerdorf

B) Willam Makepiece

C) Drek Kolkevi

D) List Barely

View Answer
Option – A.

4) PHP’s numerically indexed array begin with position __.

A) 1

B) 2

C) 0

D) -1

View Answer
Option – C.

5) If one intends to create a model that will be assumed by a number of closely related objects, which class must be used?

A) Normal class

B) Static class

C) Abstract class

D) Interface

View Answer
Option – C.

6) The attack which involves the insertion of malicious code into a page frequented by other users is known as..

A) basic sql injection

B) advanced sql injection

C) cross-site scripting

D) scripting

View Answer
Option – C.

7) The filesize() function returns the file size in ___.

A) bits

B) bytes

C) kilobytes

D) gigabytes

View Answer
Option – B.

8) How many functions does PHP offer for searching and modifying strings using Perl-compatible regular expressions.

A) 7

B) 8

C) 9

D) 10

View Answer
Option – B.

9) Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?





View Answer
Option – A.

10) The updated MySQL extension released with PHP 5 is typically referred to as..


B) mysql

C) mysqli

D) mysqly

View Answer
Option – C.

11) Which of the following is not the scope of Variable in PHP?

A) Local

B) Global

C) Static

D) Extern

View Answer
Option – D.

12) PHP is _______ scripting language.

A) Server-side

B) Clint-side      

C) Middle-side

D) Out-side

View Answer
Option – A.

13) Which of the following is not true?

A) PHP can be used to develop web applications.

B) PHP makes a website dynamic

C) PHP applications can not be compile

D)PHP can not be embedded into html.

View Answer
Option – D.

14) When you need to obtain the ASCII value of a character which of the following function you apply in PHP?

A) chr( );

B) asc( );

C) ord( );

D) val( );

View Answer
Option – C.

15) How many types of loops are supported in PHP?

A) 2

B) 3

C) 4

D) 5

View Answer
Option – C.

16) Which method is used to check the validation of a email address

A) validateAddress

B) ValidateMail

C) CheckAddress

D) CheckMail

View Answer
Option – A.

17) A variable name can only contain ____________?
A) alphanumeric characters
B) underscores
C) Both A and B
D) None of the above

View Answer
Option – C.

18) How many variable scope are there in php?
A) 2
B) 3
C) 1
D) 4

View Answer
Option – B.

19) What is the default execution time set in set_time_limit()?

A) 20 secs

B) 30 secs

C) 40 secs

D) 35 secs

View Answer
Option – B.

20) Which one of the following keywords is used to define an abstract class?

A) extends

B) implements

C) abstract

D) new

View Answer
Option – C.

Thank You for Visiting Our Website!!

error: Content is protected !!