1--TEST--
2Bug #74361: Compaction in array_rand() violates COW (variation)
3--FILE--
4<?php
5
6$array = range(0, 15);
7for ($i = 0; $i <= 8; $i++) {
8    unset($array[$i]);
9}
10
11foreach ($array as $x) {
12    var_dump($x);
13    array_rand($array, 1);
14}
15
16?>
17--EXPECT--
18int(9)
19int(10)
20int(11)
21int(12)
22int(13)
23int(14)
24int(15)
25