Hide Ads
 Refresh   About   Tools 

PHP random_int() Randomosity Tester

+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 1,180,476, groups: 181
High / Low / Range / Average
Frequency: 3,473 / 0 / 3,473 / 1,180.48
Rows: 643 / 1 / 642 / 5.52
Frequency
Rows
3,473
1
3,471
1
3,468
1
3,448
1
3,439
1
3,435
1
3,432
1
3,430
2
3,429
1
3,425
1
3,423
1
3,421
1
3,414
1
3,411
1
3,406
1
3,404
1
3,401
1
3,398
1
3,397
1
3,396
2
3,395
1
3,394
2
3,393
3
3,389
1
3,386
1
3,385
2
3,384
3
3,383
3
3,378
1
3,377
1
3,376
2
3,375
1
3,373
2
3,372
1
3,370
1
3,369
3
3,368
1
3,367
1
3,366
2
3,365
1
3,364
2
3,363
1
3,362
1
3,361
3
3,360
1
3,359
6
3,358
1
3,357
1
3,356
1
3,355
1
3,354
2
3,353
2
3,351
2
3,350
3
3,348
3
3,346
1
3,345
2
3,344
4
3,343
1
3,342
2
3,341
1
3,339
2
3,338
2
3,337
3
3,336
2
3,335
1
3,334
3
3,333
1
3,332
3
3,331
4
3,329
4
3,328
3
3,327
1
3,326
1
3,325
2
3,324
1
3,323
1
3,322
2
3,321
3
3,320
4
3,319
1
3,318
4
3,317
1
3,316
6
3,315
6
3,314
4
3,313
2
3,312
2
3,311
2
3,310
4
3,309
1
3,308
6
3,307
2
3,306
1
3,305
2
3,304
1
3,303
2
3,302
4
3,301
3
3,300
7
3,299
4
3,298
1
3,296
3
3,295
3
3,294
1
3,293
2
3,292
1
3,291
1
3,290
1
3,289
5
3,288
5
3,287
6
3,286
3
3,285
2
3,284
2
3,283
2
3,282
1
3,281
2
3,280
1
3,279
3
3,277
2
3,276
2
3,275
2
3,273
1
3,272
3
3,269
1
3,268
1
3,267
2
3,266
8
3,265
2
3,264
3
3,262
1
3,261
2
3,260
3
3,257
1
3,256
1
3,255
1
3,254
4
3,253
5
3,252
2
3,251
2
3,249
2
3,248
1
3,247
1
3,246
3
3,245
2
3,244
3
3,241
2
3,240
2
3,239
1
3,237
1
3,236
1
3,235
2
3,234
2
3,228
1
3,226
1
3,225
3
3,224
3
3,223
1
3,222
1
3,220
3
3,218
1
3,214
1
3,213
1
3,212
2
3,211
3
3,209
1
3,208
1
3,207
1
3,205
2
3,202
1
3,201
1
3,194
1
3,192
1
3,190
1
3,187
1
3,186
1
3,180
1
3,171
1
3,167
1
0
643

Test runs: 0Avg run : 0 seconds Test time: 0 seconds Data Save: 0 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 1,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