Hide Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,111,602 data
+1 +10 +100 +1K +10K +MAX
range: 1-10,000, data points: 1,566,553, groups: 90
High / Low / Range / Average
Frequency: 203 / 112 / 91 / 156.66
Rows: 337 / 1 / 336 / 111.11
Frequency
Rows
203
1
202
2
200
3
199
1
197
1
196
5
195
1
194
5
193
6
192
7
191
4
190
14
189
8
188
17
187
26
186
26
185
26
184
38
183
37
182
39
181
49
180
50
179
54
178
85
177
101
176
100
175
96
174
116
173
147
172
144
171
160
170
188
169
180
168
195
167
229
166
224
165
265
164
255
163
273
162
287
161
288
160
284
159
302
158
337
157
309
156
306
155
303
154
313
153
294
152
291
151
317
150
289
149
284
148
271
147
251
146
242
145
229
144
173
143
168
142
156
141
156
140
155
139
101
138
114
137
79
136
92
135
80
134
59
133
50
132
48
131
44
130
24
129
27
128
16
127
24
126
10
125
10
124
2
123
7
122
6
121
7
120
3
119
3
118
3
117
3
116
1
115
1
114
1
113
1
112
1

Test runs: 1,111,603Avg run : 0.000001 seconds Test time: 1.399729 seconds Data Save: 0.406016 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 10,000.

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