Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Bug #74361: Compaction in array_rand() violates COW (variation) --FILE-- <?php $..

Decoded Output download

--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)

Did this file decode correctly?

Original Code

--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)

Function Calls

range 1

Variables

None

Stats

MD5 00fedf9253f781f079acf2202cbdc6d9
Eval Count 0
Decode Time 90 ms