Hide Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,816,346 data
+1 +10 +100 +1K +10K +MAX
range: 1-141, data points: 1,816,347, groups: 115
High / Low / Range / Average
Frequency: 13,187 / 12,628 / 559 / 12,881.89
Rows: 3 / 1 / 2 / 1.23
Frequency
Rows
13,187
1
13,086
1
13,080
1
13,041
2
13,034
1
13,030
1
13,027
1
13,023
2
13,018
1
13,006
1
13,003
1
13,002
1
13,001
1
12,995
1
12,986
1
12,984
2
12,983
1
12,981
1
12,979
1
12,975
1
12,965
1
12,964
1
12,963
1
12,962
1
12,961
1
12,960
1
12,959
2
12,957
2
12,951
1
12,949
1
12,948
1
12,946
1
12,944
1
12,942
1
12,941
1
12,938
1
12,935
1
12,934
1
12,931
1
12,930
1
12,925
1
12,922
1
12,919
1
12,916
2
12,914
2
12,913
1
12,912
1
12,911
2
12,909
1
12,908
1
12,907
1
12,905
1
12,904
1
12,902
3
12,899
1
12,898
2
12,896
1
12,890
2
12,889
2
12,886
1
12,882
2
12,880
1
12,878
2
12,875
1
12,871
1
12,866
1
12,863
2
12,862
1
12,857
1
12,855
2
12,854
1
12,853
1
12,851
1
12,850
1
12,848
1
12,839
1
12,837
1
12,833
2
12,831
1
12,829
1
12,828
1
12,826
2
12,825
1
12,824
1
12,817
1
12,816
1
12,815
1
12,814
3
12,813
1
12,811
1
12,809
1
12,807
2
12,806
1
12,802
1
12,798
2
12,797
1
12,791
1
12,788
1
12,785
3
12,777
1
12,776
1
12,768
1
12,763
1
12,750
1
12,749
1
12,740
1
12,725
1
12,723
2
12,710
1
12,708
1
12,704
1
12,668
1
12,654
1
12,643
1
12,628
1

Test runs: 1,816,347Avg run : 0.000001 seconds Test time: 1.419199 seconds Data Save: 0.179980 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 141.

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


Hide Ads