How can we improve this code for better performance

Viewed 120

This question was asked to me in an interview. But I couldn't think of a way to improve it. can you improve this?

$target = array(1,rand(1,5));
for ($i = 0; $i < 10; $i++) { 
   $target = array_merge( $target, array(rand($i,5),rand(1,$i)) ); 
} 
1 Answers
Related