It’s not clear what you want, but:
<?php
class Number{
public function getRandNumber($min, $max) {
echo(rand($min,$max));
}
}
$number = new Number();
$number->getRandNumber(0, 100);
?>
2
solved How to use GET method to generate random dice number using object oriented php? [closed]