Multiple choice php

What is displayed when the following script is executed?

define(myvalue, "10");
$myarray[10] = "Dog";
$myarray[] = "Human";
$myarray['myvalue'] = "Cat";
$myarray["Dog"] = "Cat";
print "The value is: ";
print $myarray[myvalue]."\\n";

  1. The value is: Dog

  2. The value is: Cat

  3. The value is: Human

  4. The value is: 10

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The constant 'myvalue' is defined as '10'. In '$myarray[myvalue]', PHP uses the constant's value, accessing '$myarray[10]'. Since '$myarray[10]' was assigned the string 'Dog', the output is 'The value is: Dog'. The later assignment to the string key 'myvalue' does not affect this.