nerdexam
Zend

200-710 · Question #186

Which value will be assigned to the key 0 in this example? $foo = array(true, '0' => false, false => true);

The correct answer is A. true. See the full explanation below for the reasoning.

Arrays

Question

Which value will be assigned to the key 0 in this example? $foo = array(true, '0' => false, false => true);

Options

  • Atrue

How the community answered

(18 responses)
  • A
    100% (18)

Topics

#array key coercion#boolean keys#string-to-int keys#duplicate keys

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice