You are on page 1of 6

1)__ command is used to enter data into created table.

A) SELECT
B) LOAD
C) INSERT
D) UPDATE

2)

Which one of the following


databases has PHP
supported almost since the
beginning?

a. Oracle
Database

b. SQL

c. SQL+

d. MySQL

3)

Which one of the following statements


is used to create a table?

a. CREATE TABLE table_name


(column_name column_type);

b. CREATE table_name (column_type


column_name);

c. CREATE table_name (column_name


column_type);

d. CREATE TABLE table_name


(column_type column_name);
4) An Object is a/an ________ of a class.

type

b. prototype

c. instance
d. object
5)

Which one of the following keywords is used to define an


abstract class?

a. extends

b. implements

c. abstract

d. new
6)

Which one of the following statements should be used to include a file?

a. #include ‘filename’;

b. include ‘filename’;

c. @include ‘filename’;

d. #include ;
7)Php files have default extension of

.php

.html

.xml

.ph

8) Which of the following php statement/statements will store 111 in variable num?
i) int $num = 111;

ii) int mum = 111;

iii) $num = 111;

iv) 111 = $num;


 

A. Both (i) and (ii)


B. All of the mentioned.
C. Only (iii)
D. Only (i)

9) Which statement will output $x on the screen? 


A. echo “\$x”;
B. echo “$$x”;
C. echo “/$x”;
D. echo “$x;

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

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

11) PHP’s numerically indexed array begins with position __. 

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

12) Which one of the following functions will convert a string to all uppercase? 

A. strtoupper()
B. uppercase()
C. str_uppercase()
D. struppercase()

13) Which two predefined variables are used to retrieve information from forms? 
A. $GET & $SET
B. $_GET & $_SET
C. $__GET & $__SET
D. GET & SET

14) When you use the $_GET variable to collect data, the data is visible to. 

A. none
B. only you
C. everyone
D. selected few

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

A. bits
B. bytes
C. kilobytes
D. gigabytes

16) Which one of the following function outputs the contents of a string variable to the specified

resource? 

A. filewrite()
B. fwrite()
C. filewrites()
D. fwrites()

17)A PHP script should start with______ and end with______

<php>

<?php ?>

<? ?>

<? php>

18) we can use _____to comment a single line

/?
//

/#

/**

19) Which keyword is used to refer to properties or methods within the class itself? 
A. private
B. public
C. protected
D. $this

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

A. MySQL
B. mysql
C. mysqli
D. mysqly

21) Which one of the following statements instantiates the mysqli class? 

A. $mysqli = new mysqli()


B. $mysqli = new mysqli()
C. $mysqli->new.mysqli()
D. mysqli->new.mysqli()

22) Which one of the following keyword is used to inherit our subclass into a superclass? 

A. extends
B. implements
C. inherit
D. include

23) Which of the following term originates from the Greek language that means “having

multiple forms,” defines OOP’s ability to redefine, a class’s characteristic 

A. Abstraction
B. Polymorphism
C. Inheritance
D. Differential

24) Which version of PHP introduced the advanced concepts of OOP? 

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

25) When you use the $_POST variable to collect data, the data is visible to. 

A. none
B. only you
C. everyone
D. selected few

26) When you use the $_GET variable to collect data, the data is visible to. 

A. none
B. only you
C. everyone
D. selected few

You might also like