TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
310 B
24 lines
310 B
--TEST--
|
|
Bug #74361: Compaction in array_rand() violates COW (variation)
|
|
--FILE--
|
|
<?php
|
|
|
|
$array = range(0, 15);
|
|
for ($i = 0; $i <= 8; $i++) {
|
|
unset($array[$i]);
|
|
}
|
|
|
|
foreach ($array as $x) {
|
|
var_dump($x);
|
|
array_rand($array, 1);
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(9)
|
|
int(10)
|
|
int(11)
|
|
int(12)
|
|
int(13)
|
|
int(14)
|
|
int(15)
|
|
|