20. What will the following script output?
<?php
class a
{
function a()
{
echo Parent called ;
}
}
class b
{
function b()
{
}
}
$c = new b();
?>
Вариант ответа 1 - A) Parent called
Вариант ответа 2 - B) An error
Вариант ответа 3 - C) A warning
Вариант ответа 4 - D) Nothing
Комментарий: The script will output nothing (Answer D). This is because parent constructors are not automatically called from a child class’ constructor—they have to be executed explicitly. The same, of course, is true of any other class member as well.