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