PHP Test online
11. What will the following script output?Вариант ответа 1 - A) 10 Вариант ответа 2 - B) Null Вариант ответа 3 - C) Empty Вариант ответа 4 - D) Nothing Вариант ответа 5 - E) An error Comments: The right answer here is D—the script won’t output anything because my_class::_my_class() is not a valid constructor (did you notice the underscore at the beginning of the method name?). You might think that this is nothing but a trick question designed to see how much attention you’re paying during the exam… and you’re right. If you think about it, though, you’ll probably agree with us that many bugs occur because of misplaced haracters. Therefore, this question is really designed to gauge your ability to catch mistakes in OOP code, rather than just to trick you. |
Comments
| User name | Comment |
|---|
Русский