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
2) Which of the following method sends input to a script via a URL?
A) Get
B) Post
C) Both
D) None
3) Who is the father of PHP?
A) Rasmus Lerdorf
B) Willam Makepiece
C) Drek Kolkevi
D) List Barely
4) PHP’s numerically indexed array begin with position __.
A) 1
B) 2
C) 0
D) -1
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
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
7) The filesize() function returns the file size in ___.
A) bits
B) bytes
C) kilobytes
D) gigabytes
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
9) Which logging option’s description is, if an error occurs when writing to the syslog, send output to the system console?
A) LOG_CONS
B) LOG_NDELAY
C) LOG_ODELAY
D) LOG_PERROR
10) The updated MySQL extension released with PHP 5 is typically referred to as..
A) MySQL
B) mysql
C) mysqli
D) mysqly
11) Which of the following is not the scope of Variable in PHP?
A) Local
B) Global
C) Static
D) Extern
12) PHP is _______ scripting language.
A) Server-side
B) Clint-side
C) Middle-side
D) Out-side
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.
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( );
15) How many types of loops are supported in PHP?
A) 2
B) 3
C) 4
D) 5
16) Which method is used to check the validation of a email address
A) validateAddress
B) ValidateMail
C) CheckAddress
D) CheckMail
17) A variable name can only contain ____________?
A) alphanumeric characters
B) underscores
C) Both A and B
D) None of the above
18) How many variable scope are there in php?
A) 2
B) 3
C) 1
D) 4
19) What is the default execution time set in set_time_limit()?
A) 20 secs
B) 30 secs
C) 40 secs
D) 35 secs
20) Which one of the following keywords is used to define an abstract class?
A) extends
B) implements
C) abstract
D) new
Thank You for Visiting Our Website!!