All pastes #610814 Raw Edit

Something

public php v1 · immutable
·published 2007-07-09 17:23 UTC
rendered paste body
<?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)        );?>