Show Ads
 Refresh   About   Tools 

PHP random_int() Randomosity Tester

+100 data
+1 +10 +100 +1K +10K +MAX
range: 1-100, data points: 960,146, groups: 92
High / Low / Range / Average
Frequency: 9,869 / 9,373 / 496 / 9,601.46
Rows: 3 / 1 / 2 / 1.09
Frequency
Rows
9,869
1
9,776
1
9,766
2
9,755
1
9,754
1
9,751
1
9,749
1
9,735
1
9,734
1
9,725
1
9,723
1
9,721
1
9,719
1
9,717
1
9,709
1
9,706
2
9,701
1
9,695
1
9,692
1
9,684
1
9,677
1
9,676
1
9,661
1
9,660
1
9,656
1
9,653
1
9,651
1
9,649
1
9,648
1
9,642
1
9,637
1
9,634
1
9,631
1
9,627
1
9,623
1
9,622
1
9,620
1
9,618
1
9,617
1
9,614
1
9,611
1
9,609
1
9,605
1
9,604
1
9,601
1
9,599
1
9,594
2
9,590
1
9,587
1
9,585
1
9,583
1
9,582
1
9,581
1
9,580
1
9,574
1
9,573
1
9,570
1
9,569
1
9,567
1
9,565
1
9,563
1
9,560
2
9,559
1
9,558
1
9,557
1
9,553
3
9,550
1
9,537
1
9,536
1
9,535
1
9,534
1
9,529
2
9,528
1
9,524
1
9,522
2
9,521
1
9,509
1
9,504
1
9,501
1
9,499
1
9,497
1
9,489
1
9,484
1
9,472
1
9,470
1
9,467
1
9,464
1
9,456
1
9,438
1
9,433
1
9,415
1
9,373
1

Test runs: 100Avg run : 0.000290 seconds Test time: 0.029024 seconds Data Save: 0.031595 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 100.

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

Show Ads