Hello Everyone...!!!
This morning i am here with Multiple choice questions of PHP for PHP developers to improve Web Development skills.
These questions are based on Arrays, Syntax and Uploading files with PHP.
a) I like Volvo BMW and Toyota)
b) I like Volvo, BMW and Toyota)
c) I like Volvo, BMW and Toyota
d) I like. Volvo.,. BMW. and) Toyota) .
Que.2 What will be the output of the following PHP code?
a) Array ( Peter Ben Joe )
b) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
c) Array ( 35 37 43 )
d) Array ( “[Peter] => 35″ “[Ben] => 37″ “[Joe] => 43″ )
Que.3 What will be the output of the following PHP code?
a) Array ( [d] => yellow )
b) Array ( [c] => blue )
c) Array ( [a] => red )
d) Array ( [e] => yellow )
Que.4 What will be the output of the following PHP code?
a) green
b) red
c) blue
d) none of the above
Que.5 What will be the output of the following PHP code?
a) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
b) Array ( [peter] => 35 [ben] => 37 [joe] => 43 )
c) Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 )
d) Array ( [PeTeR] => 35 [BeN] => 37 [Joe] => 43 )
Que.1 What will be the output of the following PHP code ?
a) Hello world1 Hello world2 Hello World3
b) Hello world1
Hello world2
Hello World3
c) Error
d) Hello world1 Hello world3
Que.2 What will be the output of the following PHP code ?
a) redredred
b) redred
c) red
d) Error
Que.3 What will be the output of the following PHP code ?
a) # Hello world
b) Hello world# Hello world
c) Hello world
d) Error
Que.4 What will be the output of the following PHP code ?
a) Hello world
b) Hello world in italics
c) Nothing
d) Error
Que.5 What will be the output of the following PHP code ?
a) Hello world
b) echo “Hello world”
c) echo Hello world
d) Error
Que.1 Which of the following directive determines the maximum amount of time that a PHP script will spend attempting to parse input before registering a fatal error?
a) max_take_time
b) max_intake_time
c) max_input_time
d) max_parse_time
Que.2 What is the default value of max_input_time directive?
a) 30 seconds
b) 60 seconds
c) 120 seconds
d) 1 second
Que.3 What is the default value of the directive max_file_limit?
a) 10 files
b) 15 files
c) 20 files
d) 25 files
Que.4 Which directive sets a maximum allowable amount of memory in megabytes that a script can allow?
a) max_size
b) post_max_size
c) max_memory_limit
d) memory_limit
Que.5 How many items are available in the $_FILES array?
a) 2
b) 3
c) 4
d) 5
This morning i am here with Multiple choice questions of PHP for PHP developers to improve Web Development skills.
These questions are based on Arrays, Syntax and Uploading files with PHP.
PHP Questions :
Questions Based On Arrays :
Que.1 What will be the output of the following PHP code?
$cars = array("Volvo", "BMW", "Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>
b) I like Volvo, BMW and Toyota)
c) I like Volvo, BMW and Toyota
d) I like. Volvo.,. BMW. and) Toyota) .
Que.2 What will be the output of the following PHP code?
$fname = array("Peter", "Ben", "Joe");
$age = array("35", "37", "43");
$c = array_combine($fname, $age);
print_r($c);
?>
b) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
c) Array ( 35 37 43 )
d) Array ( “[Peter] => 35″ “[Ben] => 37″ “[Joe] => 43″ )
Que.3 What will be the output of the following PHP code?
$a1 = array("a"=>"red", "b"=>"green", "c"=>"blue", "d"=>"yellow");
$a2 = array("e"=>"red", "f"=>"green", "g"=>"blue");
$result = array_diff($a1, $a2);
print_r($result);
?>
b) Array ( [c] => blue )
c) Array ( [a] => red )
d) Array ( [e] => yellow )
Que.4 What will be the output of the following PHP code?
$a = array("a"=>"red", "b"=>"green", "c"=>"blue");
echo array_shift($a);
print_r ($a);
?>
b) red
c) blue
d) none of the above
Que.5 What will be the output of the following PHP code?
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
print_r(array_change_key_case($age, CASE_UPPER));
?>
b) Array ( [peter] => 35 [ben] => 37 [joe] => 43 )
c) Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 )
d) Array ( [PeTeR] => 35 [BeN] => 37 [Joe] => 43 )
Questions based on syntax
Que.1 What will be the output of the following PHP code ?
Echo "Hello World1";
echo " Hello world2";
ECHO " Hello world3";
?>
b) Hello world1
Hello world2
Hello World3
c) Error
d) Hello world1 Hello world3
Que.2 What will be the output of the following PHP code ?
$color = "red";
echo "$color";
echo "$COLOR";
echo "$Color";
?>
b) redred
c) red
d) Error
Que.3 What will be the output of the following PHP code ?
# echo "Hello world";
echo "# Hello world";
?>
b) Hello world# Hello world
c) Hello world
d) Error
Que.4 What will be the output of the following PHP code ?
echo "Hello World"
?>
b) Hello world in italics
c) Nothing
d) Error
Que.5 What will be the output of the following PHP code ?
echo "echo "Hello World"";
?>
b) echo “Hello world”
c) echo Hello world
d) Error
Questions based on Uploading files with PHP
Que.1 Which of the following directive determines the maximum amount of time that a PHP script will spend attempting to parse input before registering a fatal error?
a) max_take_time
b) max_intake_time
c) max_input_time
d) max_parse_time
Que.2 What is the default value of max_input_time directive?
a) 30 seconds
b) 60 seconds
c) 120 seconds
d) 1 second
Que.3 What is the default value of the directive max_file_limit?
a) 10 files
b) 15 files
c) 20 files
d) 25 files
Que.4 Which directive sets a maximum allowable amount of memory in megabytes that a script can allow?
a) max_size
b) post_max_size
c) max_memory_limit
d) memory_limit
Que.5 How many items are available in the $_FILES array?
a) 2
b) 3
c) 4
d) 5
Answersheet of these Questions will be available Tomorrow
Want more Questions....??? CLICK THE LINKS BELOW
PHP Multiple choice questions and answers-1
PHP Multiple choice questions and answers-2
PHP Multiple choice questions and answers-3
PHP Multiple choice questions-4
PHP Multiple choice questions and answers-2
PHP Multiple choice questions and answers-3
PHP Multiple choice questions-4
0 comments:
Post a Comment