Question:What is the output of the following code block?

<?php

$array = array(1 => 0, 2, 3, 4);

array_splice($array, 3, count($array), array_merge(array('x'), array_slice($array, 3)));

print_r($array);

?>
 

A 1 => 1, 2 => 2, 3 => x, 4=> 4 

B 0 => 1, 2 => 2, 3 => 3, 4 => 4, x => 3 

C  

D 0 => x, 1 => 0, 2 => 1, 3=> 2, 4=>3 

E  

+ Answer
+ Report
Total Preview: 703

Copyright © 2024. Powered by Intellect Software Ltd