The maximum value returned by getrandmax() is valid only if you call the rand() function without any parameter.
For eg
<?php
getrand(35000, 50000);
?>
would still work because you have specified the limits even though getrandmax() returned 32767.