Something
public php v1 · immutable<?function dummy($v){ return array_rand($v);}function test($func,$values,$ic) { $output = array(); while($ic--){ $result = $func($values); if(!isset($output[$result])){ $output[$result] = 0; } $output[$result] += 1; }; return $output;}$values = array("foo"=>2, "bar"=>3);print_r( test(dummy, $values, 1000) );?>