1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-22 00:09:59 +01:00

Make Base::numberBetween() 32bit compatible.

Changed default range of `Faker\Provider\Base::numberBetween()` to result in sequences that do not depend on word size.
This commit is contained in:
Maik Penz 2013-02-05 21:54:31 +01:00
parent 85e3754319
commit 5a7439ad1e

View File

@ -74,7 +74,7 @@ class Base
*/
public static function numberBetween($from = null, $to = null)
{
return mt_rand($from ?: 0, $to ?: PHP_INT_MAX);
return mt_rand($from ?: 0, $to ?: 2147483647); // 32bit compat default
}
/**