- mt_rand: documentation ( source)
<?php
class Test {
private $testy;
function __construct($input) {
$this->testy = $input;
}
public function doSomething() {
return $this->testy * mt_rand();
}
}
$obj = new Test(1);
echo $obj->doSomething();