Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+817,493 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 817,494, groups: 164
High / Low / Range / Average
Frequency: 1,750 / 1,528 / 222 / 1,634.99
Rows: 10 / 1 / 9 / 3.05
Frequency
Rows
1,750
1
1,745
1
1,741
1
1,734
1
1,733
1
1,730
1
1,729
1
1,728
1
1,726
1
1,721
1
1,717
2
1,712
2
1,711
1
1,710
1
1,709
1
1,707
1
1,706
1
1,705
2
1,704
1
1,702
3
1,701
2
1,700
2
1,699
3
1,698
2
1,697
2
1,696
2
1,695
2
1,693
1
1,692
1
1,691
1
1,690
1
1,689
4
1,688
2
1,687
3
1,686
5
1,685
5
1,683
4
1,682
1
1,681
2
1,680
2
1,679
3
1,678
5
1,677
1
1,676
2
1,675
4
1,674
4
1,673
1
1,672
7
1,671
1
1,670
4
1,669
2
1,668
1
1,667
1
1,666
1
1,665
7
1,664
5
1,663
3
1,662
3
1,661
5
1,660
3
1,659
2
1,658
2
1,657
3
1,656
2
1,655
7
1,654
6
1,653
4
1,652
3
1,651
2
1,650
9
1,649
3
1,648
3
1,647
6
1,646
6
1,645
5
1,644
6
1,643
6
1,642
6
1,641
7
1,640
9
1,639
1
1,638
4
1,637
2
1,636
2
1,635
7
1,634
6
1,633
5
1,632
7
1,631
3
1,630
5
1,629
2
1,628
6
1,627
1
1,626
3
1,625
3
1,624
8
1,623
4
1,622
7
1,621
5
1,620
5
1,619
10
1,618
5
1,617
8
1,616
2
1,615
4
1,614
3
1,613
2
1,612
3
1,611
3
1,610
4
1,609
7
1,608
2
1,607
4
1,606
5
1,605
7
1,604
4
1,603
5
1,602
1
1,601
3
1,600
2
1,599
6
1,598
5
1,597
1
1,596
5
1,595
1
1,594
5
1,593
4
1,592
1
1,591
1
1,589
3
1,588
3
1,587
4
1,586
5
1,585
1
1,584
1
1,583
4
1,582
3
1,581
2
1,580
1
1,577
1
1,575
4
1,574
5
1,573
1
1,572
2
1,571
3
1,570
2
1,569
3
1,567
3
1,566
1
1,565
1
1,564
1
1,563
2
1,562
1
1,561
1
1,559
1
1,555
1
1,553
1
1,552
1
1,550
1
1,549
2
1,544
1
1,543
1
1,530
1
1,528
1

Test runs: 817,494Avg run : 0.000002 seconds Test time: 1.426049 seconds Data Save: 0.200502 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

Show Ads