3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = range(0, 49); $prob = array_fill(0, 50, 0); for ($i = 0; $i < 10000; $i++) { $rand = array_rand($values, 10); foreach($rand as $key => $value) { $prob[$values[$value]]++; } } asort($prob); var_dump($prob);

preferences:
18.86 ms | 402 KiB | 5 Q