<<< Previous question <<< Question ID#0517.md >>> Next question >>>
What is the output of the following code block?
$array = array(1 => 0, 2, 3, 4);
array_splice($array, 3, count($array), array_merge(array('x'), array_slice($array, 3)));
var_dump($array);
- A) 0 => 0, 1 => 2, 2 => 3, 3 => x, 4 => 4
- B) 1 => 1, 2 => 2, 3 => x, 4 => 4
- C) 0 => 1, 2 => 2, 3 => 3, 4 => 4, x => 3
- D) 0 => x, 1 => 0, 2 => 1, 3 => 2, 4 => 3
Answer
Answer: A