Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,865,022 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 1,865,023, groups: 202
High / Low / Range / Average
Frequency: 1,991 / 1,744 / 247 / 1,865.02
Rows: 15 / 1 / 14 / 4.95
Frequency
Rows
1,991
2
1,990
1
1,985
1
1,979
1
1,977
1
1,976
1
1,974
1
1,967
1
1,966
1
1,964
1
1,961
1
1,960
1
1,959
1
1,957
1
1,955
1
1,954
2
1,953
2
1,951
3
1,950
1
1,949
2
1,946
2
1,945
1
1,944
4
1,943
3
1,942
2
1,941
2
1,939
3
1,937
1
1,936
2
1,935
3
1,934
6
1,933
1
1,932
3
1,931
5
1,930
6
1,929
1
1,928
1
1,927
3
1,926
8
1,925
3
1,924
2
1,923
2
1,922
2
1,921
5
1,920
4
1,919
6
1,918
5
1,917
5
1,916
5
1,915
7
1,914
3
1,913
3
1,912
4
1,911
6
1,910
3
1,909
6
1,908
14
1,907
3
1,906
4
1,905
12
1,904
10
1,903
5
1,902
5
1,901
9
1,900
8
1,899
10
1,898
4
1,897
6
1,896
7
1,895
5
1,894
10
1,893
2
1,892
6
1,891
7
1,890
6
1,889
4
1,888
9
1,887
6
1,886
8
1,885
8
1,884
7
1,883
12
1,882
11
1,881
11
1,880
15
1,879
7
1,878
7
1,877
9
1,876
9
1,875
11
1,874
8
1,873
4
1,872
5
1,871
8
1,870
9
1,869
9
1,868
9
1,867
9
1,866
8
1,865
7
1,864
10
1,863
9
1,862
15
1,861
9
1,860
7
1,859
8
1,858
1
1,857
9
1,856
10
1,855
7
1,854
11
1,853
12
1,852
13
1,851
10
1,850
6
1,849
10
1,848
10
1,847
5
1,846
9
1,845
11
1,844
9
1,843
6
1,842
7
1,841
11
1,840
10
1,839
3
1,838
8
1,837
4
1,836
9
1,835
9
1,834
6
1,833
9
1,832
9
1,831
7
1,830
8
1,829
6
1,828
9
1,827
7
1,826
6
1,825
3
1,824
7
1,823
8
1,822
10
1,821
4
1,820
7
1,819
5
1,818
6
1,817
4
1,816
3
1,815
5
1,814
3
1,813
4
1,812
4
1,811
5
1,810
6
1,809
8
1,808
9
1,807
1
1,806
2
1,805
2
1,804
5
1,803
2
1,801
1
1,800
2
1,799
3
1,797
4
1,796
5
1,795
1
1,794
3
1,793
1
1,792
2
1,791
1
1,790
3
1,787
1
1,786
1
1,785
3
1,784
3
1,783
2
1,782
2
1,780
1
1,779
1
1,778
1
1,777
1
1,775
1
1,774
2
1,773
1
1,772
1
1,771
1
1,770
1
1,769
1
1,768
1
1,766
1
1,765
2
1,764
1
1,763
1
1,762
1
1,758
1
1,756
1
1,754
2
1,752
1
1,751
1
1,744
2

Test runs: 1,865,023Avg run : 0.000001 seconds Test time: 1.419043 seconds Data Save: 0.218991 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