Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,418,387 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 1,418,388, groups: 196
High / Low / Range / Average
Frequency: 3,023 / 2,661 / 362 / 2,836.78
Rows: 9 / 1 / 8 / 2.55
Frequency
Rows
3,023
1
3,011
1
3,005
1
2,977
1
2,967
1
2,964
1
2,962
1
2,959
1
2,958
1
2,957
1
2,953
1
2,951
1
2,950
1
2,949
2
2,941
1
2,940
1
2,939
1
2,938
1
2,933
1
2,931
2
2,928
4
2,925
1
2,923
1
2,921
2
2,920
1
2,918
2
2,917
2
2,916
1
2,915
3
2,913
2
2,912
2
2,911
3
2,910
2
2,908
1
2,906
3
2,905
2
2,904
2
2,902
1
2,901
2
2,900
1
2,899
2
2,898
1
2,897
3
2,895
2
2,894
2
2,893
2
2,892
2
2,891
5
2,889
2
2,888
4
2,887
6
2,886
2
2,885
2
2,883
3
2,882
1
2,881
2
2,880
5
2,879
4
2,878
5
2,877
2
2,876
4
2,875
2
2,874
3
2,873
2
2,872
4
2,871
5
2,870
1
2,869
3
2,868
2
2,867
4
2,866
3
2,865
3
2,864
4
2,863
2
2,862
4
2,861
3
2,860
1
2,859
4
2,858
2
2,857
1
2,856
7
2,855
1
2,854
5
2,853
3
2,851
3
2,850
4
2,849
7
2,848
2
2,847
3
2,845
5
2,844
6
2,843
7
2,842
5
2,841
1
2,840
2
2,839
6
2,838
5
2,837
3
2,836
5
2,835
3
2,834
5
2,833
1
2,832
5
2,830
2
2,829
3
2,828
2
2,827
3
2,826
4
2,825
4
2,824
4
2,823
4
2,822
3
2,821
5
2,820
3
2,819
8
2,818
2
2,817
4
2,816
2
2,815
4
2,814
5
2,813
2
2,812
4
2,811
4
2,810
4
2,809
2
2,808
4
2,807
6
2,806
1
2,805
3
2,804
1
2,803
2
2,802
3
2,801
4
2,800
3
2,799
3
2,798
9
2,797
4
2,796
4
2,795
1
2,794
3
2,793
2
2,792
2
2,791
2
2,790
7
2,789
4
2,788
2
2,787
3
2,786
3
2,785
4
2,783
2
2,782
3
2,781
2
2,780
1
2,779
1
2,778
1
2,777
2
2,775
1
2,774
2
2,773
1
2,772
2
2,771
2
2,770
1
2,769
1
2,767
1
2,766
2
2,765
3
2,764
3
2,763
3
2,762
2
2,760
2
2,759
2
2,758
2
2,756
2
2,754
1
2,750
2
2,749
2
2,747
2
2,743
3
2,742
1
2,740
1
2,738
1
2,734
1
2,733
1
2,732
1
2,731
1
2,730
1
2,725
2
2,724
1
2,722
2
2,717
1
2,714
1
2,712
1
2,705
1
2,691
1
2,684
1
2,661
1

Test runs: 1,418,388Avg run : 0.000001 seconds Test time: 1.418972 seconds Data Save: 0.176886 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