3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = [1 => 2, 2 => 3]; for ($i =0 ; $i < 5; $i++) { echo array_rand($x); }

preferences:
30.97 ms | 402 KiB | 5 Q