Logo educatepk.com
MCQs & Books free for all subjects and educational help  
Subscribe email alerts:
MCQs Online
MCQs on PHP General
Books
MCQs on PHP General
All php mcq are available here.
Option image

Q No.1 of 10

Which of following variable assignment is 'by value' assignment in PHP


Option 1

$value1= & $value?


Option 2

$value1= $value?


Option 3

$value1= & $value?


Option 4

None of these


Q No.2 of 10

Identify the invalid identifier


Option 1

my-function


Option 2

size


Option 3

–some word


Option 4

This&that


Q No.3 of 10

 

Casting operator introduced in PHP 6 is


Option 1

(array)


Option 2

(int64)


Option 3

(real) or (double) or (float)


Option 4

(object)


Q No.4 of 10

Which of following is compound data type?


Option 1

Array


Option 2

Objects


Option 3

Both of these


Option 4

None of these


Q No.5 of 10

Which data types are treated as arrays


Option 1

integer


Option 2

float


Option 3

string


Option 4

booleans


Q No.6 of 10

 

Which of the following are valid float values?


Option 1

4.5678


Option 2

4.0


Option 3

7.4


Option 4

All of these


Q No.7 of 10

When defining identifier in PHP you should remember that


Option 1

Identifier are case sensitive. So $result is different than $ result


Option 2

Identifiers can be any length


Option 3

Both of these


Option 4

None of these


Q No.8 of 10

Identify the variable scope that is not supported by PHP


Option 1

Global variables


Option 2

Local variables


Option 3

Function parameters


Option 4

Hidden variables


Q No.9 of 10

 

Study following steps and determine the correct order

(1)   Open a connection to MySql server

(2)   Execute the SQL query

(3)   Fetch the data from query

(4)   Select database

(5)   Close Connection


Option 1

4, 1, 2, 5, 3


Option 2

1, 4, 2, 3, 5


Option 3

1, 5, 4, 2, 3


Option 4

4, 1, 3, 2, 5


Q No.10 of 10

 

Which of the following is not a session function?


Option 1

session_pw


Option 2

sssion_decode


Option 3

session_destroy


Option 4

session_id



Correct Answers