Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Randomly generates a price in the range (min,max).
- *
- * @param min - the min value
- * @param max - the max value
- * @return a randomly generated price value
- */
- private function generateRandomPrice($min = 1, $max = 100)
- {
- $random_price = $min + rand() / getrandmax() * ($max - $min);
- return round($random_price, 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement