Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,807,673 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 903,454, groups: 169
High / Low / Range / Average
Frequency: 1,919 / 1,656 / 263 / 1,806.91
Rows: 8 / 1 / 7 / 2.96
Frequency
Rows
1,919
1
1,916
1
1,912
1
1,903
1
1,898
1
1,895
1
1,894
1
1,893
1
1,890
1
1,889
2
1,886
1
1,884
1
1,883
3
1,882
1
1,881
1
1,880
2
1,879
4
1,878
2
1,877
1
1,876
2
1,875
1
1,874
1
1,873
3
1,872
2
1,871
1
1,870
1
1,869
5
1,868
2
1,867
1
1,866
2
1,865
2
1,864
1
1,863
1
1,861
1
1,860
3
1,859
3
1,858
3
1,857
4
1,856
5
1,855
4
1,854
1
1,853
3
1,852
2
1,851
3
1,850
2
1,849
3
1,848
2
1,847
2
1,846
3
1,845
4
1,844
6
1,843
1
1,842
5
1,841
8
1,840
5
1,839
4
1,838
3
1,837
4
1,835
4
1,834
5
1,833
8
1,832
2
1,831
2
1,830
2
1,829
2
1,828
2
1,827
7
1,825
5
1,824
2
1,823
6
1,822
1
1,821
4
1,820
5
1,819
4
1,818
1
1,817
7
1,815
5
1,814
7
1,813
6
1,812
7
1,811
6
1,810
2
1,809
6
1,808
5
1,807
3
1,806
3
1,805
2
1,804
4
1,803
3
1,802
7
1,801
3
1,800
4
1,799
2
1,798
5
1,797
7
1,796
6
1,795
8
1,794
4
1,793
4
1,792
4
1,791
7
1,790
4
1,789
6
1,788
4
1,787
5
1,786
1
1,785
4
1,784
3
1,783
2
1,782
3
1,780
5
1,779
2
1,778
1
1,777
5
1,776
4
1,775
8
1,774
1
1,773
8
1,772
2
1,771
7
1,770
8
1,769
2
1,768
1
1,767
6
1,766
4
1,765
1
1,764
3
1,763
4
1,762
2
1,761
1
1,760
1
1,759
2
1,758
2
1,757
2
1,756
3
1,755
4
1,754
4
1,753
4
1,752
2
1,750
3
1,749
2
1,748
1
1,746
1
1,745
2
1,744
2
1,743
2
1,741
1
1,740
1
1,739
1
1,738
1
1,736
1
1,735
2
1,734
2
1,732
3
1,730
1
1,729
1
1,724
1
1,720
1
1,719
2
1,718
1
1,716
2
1,715
1
1,712
2
1,711
1
1,710
1
1,707
1
1,690
2
1,683
1
1,656
1

Test runs: 1,807,674Avg run : 0.000001 seconds Test time: 1.422890 seconds Data Save: 0.413968 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

Show Ads