4. What is displayed when the following script is executed?
<?php
define(myvalue, "10");
$myarray[10] = "Dog";
$myarray[] = "Human";
$myarray[ myvalue ] = "Cat";
$myarray["Dog"] = "Cat";
print "The value is: ";
print $myarray[myvalue]."
";
?>
Вариант ответа 1 - A) The value is: Dog
Вариант ответа 2 - B) The value is: Cat
Вариант ответа 3 - C) The value is: Human
Вариант ответа 4 - D) The value is: 10
Вариант ответа 5 - E) Dog
Комментарий: The important thing to note here is that the $myarray array’s key value is being referenced without quotes around it. Because of this, the key being accessed is not the myvalue string but the value represented by the myvalue constant. Hence, it is equivalent to accessing $myarray[10], which is Dog, and Answer A is correct.