3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $a = [1, 2, 3, 4, 5]; public function getA() { return $this->a; } } $test = new Test; $_a = $test->getA(); var_dump([ 'original' => $test->getA(), 'shuffled' => shuffle($_a), 'result' => $_a, ]);

preferences:
44.9 ms | 402 KiB | 5 Q