Welcome to your PHP Practice Test 2. 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 of the following functions will generate a warning message, if a file doesn’t exist?
2. Which of the following are conditional statements in PHP?
3. The output of expression "1000" !== "+1000" is:
4. Which of the following can be used to comment on a single line?
5. Which of the following statement(s) will display output?

a. <?php/*blah*/ echo "working"?>
b. <?php
echo “working”?>
c. <?php /*blah echo "working"*/?>
d. <?php /*blah*/ echo “working”; ?>
6. Which of the following statements is using to execute one more statement more than once?
7. Which of the following will create an empty array?
8. $_COOKIE is an associative array containing the cookies in PHP.
9. Which of the following are not considered as Boolean True?
10. How to delete or remove a session in PHP?
11. Which of the following variables are superglobals in PHP?
12. If $a = TRUE; and $b = FALSE; which of the following statement(s) evaluate as TRUE?
13. Which of the following statement(s) is/are true about objects in PHP?
14. PHP doesn’t have built-in support for MPEG format.
15. What does a PHP interpreter do?
16. Which of the following scope(s) is/are not supported by PHP?
17. Logical operator XOR returns TRUE if one of the two operands is TRUE
18. Which PHP tags were deprecated in PHP 7?
a. <?php
b. <?=
c. <%
d. <script language = “php”>
19. Which of the following statement(s) is/are not true about Inheritance?
20. What will be the output of the following PHP code?
var_dump(0123 == 123)
21. What does fopen() function do?
22. Which of the following will add comments in PHP?
23. PHP scripts can be executed
24. Which of the following statements are true about PHP?
25. An instance of keyword will return true, if


Last modified: December 23, 2019

Comments

Write a Reply or Comment

Your email address will not be published.