JOIN ADRE 2.0 Telegram Group

PHP Multiple Choice Interview Questions and Answers on Functions

Questions
1 What is the output of the following function ?

	<? php
	function gkseries $subject = "PHP")
	{
		return "Learn programming in $subject ";
	}
	gkseries $subject;
	echo "with gkseries.com"
	?>
	
A Learn programming in PHP
B Learn programming in PHP with gkseries.com
C with gkseries.com
D None of the above

Answer: Option [B]
2 The function func_num_args() returns
A the number of arguments passed to the function
B the total length of the arguments
C the number of lines in the program
D the number of variables used in the program

Answer: Option [A]
Advertisement
ADRE 2.0 Mock Test - 5 Start Test
ADRE 2.0 Mock Test - 5 Start Test

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

3 What is the output of the given function ?

	<? php
	function invite (&$students)
	{
		$students = 'Learn Computer Engineering';
	}
	$vst = 'Visit gkseries.com and';
	invite($vst);
	echo $vst;
	?>
          
A Learn Computer Engineering
B Visit gkseries.com and
C visit gkseries.com and Learn Computer Engineering
D Learn Computer Engineering visit gkseries.com and

Answer: Option [C]
4 get_loaded_extensions() returns
A returns an array with the names of all variables
B returns an array with the names of all modules compiled and loaded
C returns an array with the names of all modules keywords
D none of these above

Answer: Option [B]
5 In PHP programming the function get_extension_funcs()
A returns the number of variables used in a program
B returns the total number of functions used in a module
C returns an array with the names of the functions of a module
D none of these above

Answer: Option [C]

ADRE 2.0 MOCK TEST

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test – 42 Start Test
History Test – 190 Start Test
Quantitative Aptitude Test Start Test!
Trigonometry - Mock Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
Englist(Antonyms) Mock Test 1 Start Test!
Quantitative Aptitude (Percentage) Mock Test Start Test!
Economy Mock Test 1 Unlock Test!
Books & Authors - Test 2 Unlock Test!

Chapters

Advertisement