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; var_dump([ 'original' => $test->getA(), 'shuffled' => shuffle($test->getA()), 'result' => $test->getA(), ]);

preferences:
34.81 ms | 402 KiB | 5 Q