Welcome to your PHP Practice Test 3. This test can be taken unlimited times. Signed in users can have their scores saved to be viewed later. Questions will be randomly displaying each test. Good luck!

1. Which method is being called immediately after a new object is created from the class?
2. Which of the following(s) will raise a fatal error, if the file doesn’t exist?
3. Which of the following function(s) is used to exit from the script?
4. How many maximum numbers of characters a GET request can handle?
5. What will be the output for the following PHP code?

$str ="Tutorials Panel is the best source to learn programming";


$arr = explode(" ",$str);


echo $arr[4];

6. What is a variable in PHP?
7. In PHP, an array can hold another array as a value.
8. Which type of error(s) doesn’t interrupt the execution of the script in PHP?
9. Which of the following is an invalid variable name?
10. Null is a special data type that holds
11. What is the output of the following code?

<?php


function foo($x) { $x=$x+4; }


$num=7;


foo($num);


echo $num;


?>

12. Which of the following function is used to delete a file?
13. Echo doesn’t return any value after displaying the output in PHP.
14. How you can create a connection with MySQL server using PHP API?
15. Which of the following function is used to create a constant variable in PHP?
16. How you can increase the time a program can take for the execution?
17. You can’t extend a Final defined class in PHP.
18. Which of the following can get the IP address of the client?
19. What will be the output of the following code?

<?php


echo gettype(10.0);


?>

20. Resources is a data type of variable that holds a reference to the internal resources.


Last modified: December 25, 2019

Comments

Write a Reply or Comment

Your email address will not be published.