function getSuccesByСhance($chance)
{
return mt_rand(0, 100) <= $chance;
};
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //true
var_dump(getSuccesByСhance(30)); //true
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //true
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //false
var_dump(getSuccesByСhance(30)); //false