Home > PHP & Programming > Quizzes > Practice Test: PHP Basics
Practice Test: PHP Basics
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 75% Most missed: “……………… is a type related function which returns the type of the provided variabl…”
Practice Test: PHP Basics
Time left 00:00
25 Questions

1. The ………………………….. statement will evaluate and produces the same result as copying the data from the file specified into the location in which the statement appears.
2. If …………………… is placed within an if statement, that evaluates to false, the file would be included anyway.
3. …………………. eliminate the possibility of unexpected side effects that can result from globally accessible variables that are modified, intentionally or not.
4. The PHP superglobal variable ……………………….. contains information of the URL of the page that referred the user to the current location.
5. The ……………………… is a superglobal variable that stores information passed into the script through HTTP cookies.
6. ……………………… are declared after the function name and inside parentheses.
7. ………………… is a commonly used type specifier which can be considered an integer and presented as a signed decimal number.
8. Which of the following is/are the correct ways to display a text with PHP code.
i)
ii)
iii)
9. The PHP operators Boolean AND and Boolean OR [ && || ] has ………………… associativity.
10. ……………… is a type related function which returns the type of the provided variable.
11. State whether the following statements about print( ) and echo( ) statements are True or False.
i) print( ) is capable of outputting multiple strings.
ii)
echo( ) function is faster because it returns noting, whereas print( )
will return 1 if the statement is successfully output.
12. The PHP superglobal variable …………………. contains the path component of the URL.
13. The …………………….. superglobal array can be thought of as the superglobal superset and contains a comprehensive listing of all variables found in the global scope.
14. Which of the following is/are the ways of commenting the code in PHP.
i)
ii)
iii)
15. State whether the following statements about Heredoc syntax are True or False.
i) The opening identifier must be preceded with three left angle brackets (<<<)
ii) It can be preceded by spaces or any other extraneous character.
16. The …………………….. statement is ideal when you want to output a blend of static text and dynamic information stored within one or several variables.
17. Which of the following is/are the examples of expressions used in PHP.
i) $abc=10;                 ii) $sum=100+$first_sum;               iii) $adder++;
18. ……………… error will occur when the file size exceeds the maximum size imposed by an optional MAX_FILE_SIZE hidden form field parameter.
19. …………………… is a type related function which converts a variable to the type specified by type.
20. The optional parameter …………………. is included and assigned TRUE, subsequent references to the constant will be case insensitive.
21. …………………. in PHP offers a convenient means for outputting large amounts of text.
22. PHP can do which of the following
i) Create and manipulate Adobe Flash and Portable Document Format(PDF) files.
ii) Tightly integrate with a wide array of credit card processing solutions.
iii) Evaluate a password for guess-ability by comparing it to language dictionaries and easily broken patterns.
23. State whether the following statements about identifiers are True or False.
i) Identifiers are case sensitive
ii) Identifiers can be any length
iii) An identifier name can be identical to any PHP’s predefined keywords.
24. State whether the following file inclusion statements are True or False.
i) If a file has already been included, include_once( ) will not execute.
ii) After require_once( ) is encountered, any subsequent attempts to include the same file will be ignored.
25. ……………….. are particularly useful when working with values that definitely will not require modification.