- var_dump: documentation ( source)
- shuffle: documentation ( source)
<?php
class Test
{
protected $a = [1, 2, 3, 4, 5];
public function getA()
{
return $this->a;
}
}
$test = new Test;
var_dump([
'original' => $test->getA(),
'shuffled' => shuffle($test->getA()),
'result' => $test->getA(),
]);