3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function roll ($probability, $precision = 5) { return mt_rand(1, pow(10, $precision) / $probability); } $rolls = array(); for ($i = 0; $i < 500; $i++) { $rolls[roll(0.25)]++; } var_dump($rolls);

Abusive script

This script was stopped while abusing our resources