Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,926,517 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 1,926,518, groups: 210
High / Low / Range / Average
Frequency: 4,033 / 0 / 4,033 / 192.65
Rows: 9,500 / 1 / 9,499 / 47.62
Frequency
Rows
4,033
1
4,023
1
4,021
1
4,019
1
4,000
1
3,998
1
3,995
1
3,994
1
3,990
1
3,986
1
3,981
2
3,979
1
3,976
1
3,974
2
3,973
1
3,969
1
3,966
2
3,960
1
3,958
2
3,957
1
3,955
2
3,954
1
3,953
1
3,952
1
3,951
2
3,950
1
3,948
1
3,946
2
3,945
1
3,942
1
3,940
4
3,937
2
3,935
2
3,934
1
3,931
2
3,929
3
3,928
1
3,927
1
3,926
1
3,925
1
3,924
3
3,923
3
3,922
3
3,921
1
3,920
1
3,918
2
3,917
5
3,916
3
3,915
1
3,914
3
3,911
4
3,910
3
3,909
6
3,908
2
3,907
1
3,906
5
3,905
1
3,904
4
3,902
3
3,901
2
3,900
3
3,897
1
3,896
3
3,895
3
3,894
4
3,893
5
3,892
1
3,891
2
3,890
1
3,889
4
3,887
2
3,886
2
3,885
3
3,884
5
3,883
4
3,882
3
3,881
3
3,880
4
3,879
4
3,878
6
3,877
1
3,876
2
3,875
2
3,874
3
3,873
4
3,872
3
3,871
4
3,870
2
3,869
5
3,868
4
3,867
2
3,866
4
3,865
5
3,864
1
3,863
3
3,862
3
3,861
3
3,860
3
3,859
4
3,857
6
3,856
3
3,855
4
3,854
1
3,853
3
3,852
2
3,851
4
3,850
5
3,849
2
3,848
4
3,847
3
3,846
4
3,845
3
3,844
4
3,843
2
3,842
2
3,841
5
3,840
3
3,839
3
3,838
1
3,837
4
3,836
4
3,835
4
3,834
2
3,832
5
3,831
1
3,830
1
3,829
6
3,828
2
3,827
5
3,826
1
3,825
3
3,824
1
3,823
2
3,822
2
3,821
5
3,820
3
3,819
3
3,818
5
3,817
5
3,816
5
3,815
4
3,814
4
3,813
1
3,812
4
3,811
3
3,810
3
3,809
3
3,808
3
3,807
3
3,806
2
3,805
1
3,804
4
3,803
3
3,802
1
3,800
1
3,799
3
3,798
2
3,797
1
3,796
1
3,795
3
3,793
1
3,792
2
3,791
4
3,790
2
3,789
2
3,788
2
3,787
1
3,786
4
3,785
2
3,784
3
3,782
4
3,781
3
3,779
3
3,777
2
3,776
4
3,775
1
3,774
1
3,771
1
3,770
2
3,769
3
3,767
1
3,766
1
3,764
1
3,763
2
3,762
1
3,760
2
3,759
1
3,758
3
3,756
1
3,755
2
3,754
1
3,752
1
3,751
1
3,750
1
3,743
2
3,741
2
3,739
2
3,738
1
3,737
1
3,735
1
3,729
2
3,725
1
3,721
1
3,720
1
3,708
1
3,700
1
3,693
1
3,671
1
3,668
1
0
9,500

Test runs: 1,926,518Avg run : 0.000001 seconds Test time: 1.419007 seconds Data Save: 0.162014 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