Hide Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+2,018,499 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 2,028,500, groups: 211
High / Low / Range / Average
Frequency: 4,289 / 3,902 / 387 / 4,057.00
Rows: 9 / 1 / 8 / 2.37
Frequency
Rows
4,289
1
4,257
1
4,223
1
4,220
1
4,218
1
4,214
1
4,209
1
4,204
1
4,197
1
4,194
1
4,193
1
4,190
1
4,185
1
4,182
1
4,180
1
4,176
1
4,174
1
4,172
1
4,166
1
4,165
1
4,163
1
4,162
1
4,161
2
4,160
2
4,156
1
4,155
1
4,154
1
4,153
1
4,151
1
4,150
2
4,149
1
4,146
2
4,145
1
4,141
5
4,140
3
4,138
1
4,137
1
4,136
1
4,132
2
4,130
1
4,129
3
4,128
1
4,127
2
4,126
3
4,124
1
4,123
1
4,122
1
4,121
2
4,120
1
4,119
2
4,118
2
4,117
3
4,116
4
4,115
2
4,114
2
4,113
1
4,111
4
4,110
1
4,109
1
4,108
1
4,106
2
4,105
4
4,104
3
4,103
2
4,102
3
4,101
4
4,100
5
4,099
1
4,098
2
4,097
2
4,096
3
4,095
3
4,094
2
4,093
2
4,092
5
4,091
2
4,090
4
4,089
4
4,088
1
4,087
2
4,086
1
4,085
2
4,084
6
4,083
5
4,082
4
4,081
2
4,080
5
4,079
4
4,078
1
4,077
5
4,076
2
4,075
4
4,074
1
4,073
4
4,072
5
4,071
3
4,070
6
4,069
1
4,068
3
4,067
5
4,066
7
4,065
3
4,064
2
4,063
1
4,062
4
4,061
3
4,060
3
4,059
2
4,058
5
4,057
3
4,056
4
4,055
7
4,054
1
4,053
5
4,052
2
4,051
3
4,050
9
4,049
5
4,048
2
4,047
3
4,046
4
4,045
3
4,044
2
4,043
6
4,042
2
4,041
5
4,040
3
4,039
1
4,038
6
4,037
2
4,036
4
4,035
4
4,034
3
4,033
3
4,032
3
4,031
2
4,030
3
4,029
4
4,028
2
4,027
3
4,026
6
4,025
2
4,024
2
4,023
2
4,021
2
4,020
5
4,019
2
4,018
2
4,017
4
4,016
5
4,014
1
4,013
4
4,009
3
4,008
2
4,007
4
4,006
3
4,005
2
4,004
1
4,003
1
4,002
2
4,001
3
4,000
3
3,999
2
3,997
2
3,996
3
3,995
2
3,993
5
3,991
1
3,990
4
3,989
5
3,988
2
3,987
1
3,985
3
3,984
1
3,983
3
3,982
1
3,980
2
3,979
2
3,977
2
3,976
2
3,975
2
3,974
3
3,972
1
3,971
4
3,967
2
3,964
1
3,963
3
3,962
3
3,960
1
3,958
2
3,957
1
3,955
1
3,953
1
3,952
1
3,950
1
3,948
1
3,945
1
3,943
1
3,939
1
3,933
1
3,932
1
3,931
1
3,929
1
3,925
1
3,923
1
3,920
1
3,918
1
3,916
1
3,911
1
3,906
1
3,902
1

Test runs: 2,018,500Avg run : 0.000001 seconds Test time: 1.419743 seconds Data Save: 0.162394 seconds Test Tools: Restart test: Random range 1 to: 1 2 3 4 5 10 50 100 500 1K 5K 10K 50K 100K Random Generator Method: SQLite ORDER BY RANDOM() PHP rand() PHP mt_rand() PHP random_int() Back to top


About the Randomosity Tester

This page tests the frequency distribution and timing of random number generation via these methods:

Random number results are stored in a test table. The test table is defined as:

CREATE TABLE 'test' ( 'id' INTEGER PRIMARY KEY, 'frequency' INTEGER DEFAULT '0' );

The table is initialized by creating all rows with frequency = 0. The number of rows in the table is defined by the range setting. The current test is set to use range: 1 to 500.

For each random number chosen, the table is updated via:

UPDATE test SET frequency = frequency + 1 WHERE id = :random_number

For SQLite tests, results are individually generated via the SQL call:

SELECT id FROM test ORDER BY RANDOM() LIMIT 1;

Generate more random numbers by clicking a  +  number button to start a test run.

Each test run is limted to ~1.42 seconds.

A Frequency of Frequencies chart displays:

This site was created with Open Source software. Find out more on Github: randomosity-tester v0.2.2

Back to top


Hide Ads