Вопросы: PHP Test online
2. Which of the following tags is not a valid way to begin and end a PHP code block? |
3. Which of the following is not valid PHP code? |
5. What is the difference between print() and echo()? |
6. What is the output of the following script? |
8. What will the following script output? |
10. What is the best way to iterate through the $myarray array, assuming you want to modify the value of each element as you do? |
15. Run-time inclusion of a PHP script is performed using the ________ construct, while compile-time inclusion of PHP scripts is performed using the _______ construct. |
16. Under what circumstance is it impossible to assign a default value to a parameter while declaring a function? |
17. The ____ operator returns True if either of its operands can be evaluated as True, but not both. |
18. How does the identity operator === compare two values? |
19. Which of the following expressions multiply the value of the integer variable $a by 4? |
20. How can a script come to a clean termination? |
1. What is the construct used to define the blueprint of an object called? |
3. How can you write a class so that some of its properties cannot be accessed from outside its methods? |
4. Which object-oriented pattern would you use to implement a class that must be instantiated only once for the entire lifespan of a script? |
5. A class can be built as an extension of other classes using a process known as inheritance. In PHP, how many parents can a child class inherit from? |
6. What OOP construct unavailable in PHP does the following script approximate? |
7. Assume that a class called testclass is defined. What must the name of its constructor method be? |
8. How can a class override the default serialization mechanism for its objects? |
9. In PHP 4, which object-oriented constructs from the following list are not available? |
10. How would you call the mymethod method of a class within the class itself? |
11. What will the following script output? |
12. What will the following script output? |
15. What does the following PHP code segment do? |
16. Do static class variables exist in PHP? |
18. How can you load classes on demand as they are required by the interpreter? |
19. _____________________ are used to provide high-quality solutions to a recurrent design problem using object-oriented programming. |
20. What will the following script output? |
- 1