Home  • Programming • PHP

PHP - Examination Question with Answer, Exam- 04, Round- 36 WDPF

Part-02: MCQ Question with Answer

1.What is the correct output from the code below?
<?php 
	$var = true;
	If !( $var){
	echo "Hello, World!";
	}
?>
Ans: Code not be executed.
2. What is the correct output from the code below?
<?php 
	$txt =”Bangladesh”;
	echo substr($txt,0,6);
?>
Ans: Bangla
3. When needed submitting large amount of to the server, which method we used?
Ans: Post
4. The super global variable $_SERVER[‘REMOTE_ADDR’] used to ?
Ans: Return the client pc ip address
5. Which type of function is called itself?
Ans: Recursive function
6.Which function is used to remove a value from end of an array?
Ans: Array_pop()
7. Which is the correct output from the following data?
<?php 
	$i=1;
	Do{
	   $i++;
	   Print $i;
	}while($i=<0);
Ans: 2
8. Which function is used to sort array element in descending order?
Ans: rsort()
9. Which function is used to read entire file at once?
Ans: file()
10. Which function is used to get details server information using PHP?
Ans: php_info()
11. Which file open mode use for Read/Write purpose?
Ans: r+
12. which function parses the line it reads for fields in CSV format and returns an array containing the fields read ?
Ans: fgetCSV()
13. Which function is used to rename flle in PHP?
Ans: rename()
14. What is the true about echo and print?
Ans: echo is faster than print
15. which the memory_limit directive sets a maximum allowable amout of memory ?
Ans: memory_limit
16. Which are the php variable scope ?
Ans: local, global, static
17. what is the concept of about static variable ?
Ans: static variable do not loss tata
18. what is default function and variable scope?
Ans: public
19. How many interface can be implement to one class?
Ans: Minimum one to many
20. which is true about the statements?
Ans: Interface can implement to cla by the keyword implement
21. which function we can use to check the data type?
Ans: gettype()
22. Which is the true statement about the regular expresion?
Ans: regular expresion match the pattern with string and return true or false
23. Which is the true statement about the regular expresion?
Ans: regular expresion match the pattern with string and return true or false
24. which is the correct php tag?
Ans: <? echo 'hello world!' ; ?> <?php print ("hello world!"); ?>
25. which function is used to add one php script to another php script ?
Ans: include()
26. which is the correct function to move uploaded file ?
Ans: move_uploaded_file();
27. Which function can be multiple array to one one array?
Ans: array_merge();
27. which keyword use define a constant?
Ans: define();
28. which method automatically initialize when object crated?
Ans: __constractor;
29. which software is used to php base server ?
Ans: Apache/ISS;
30. Which method we use to save data from unexpected data store on the database?
Ans: sanitize data;
31. which loop can array data retrive key and value one by one?
Ans: foreach;
32. What are the OOP foundation concept?
Ans: Encapsulation, Inheritance, Polumorphism;

Comments 0


About Author
MD. Shafiqul Islam
Copyright © 2024. Powered by Intellect Software Ltd