Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,311,971 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 1,311,972, groups: 185
High / Low / Range / Average
Frequency: 2,761 / 2,477 / 284 / 2,623.94
Rows: 9 / 1 / 8 / 2.70
Frequency
Rows
2,761
1
2,755
1
2,754
1
2,747
1
2,746
1
2,744
2
2,741
1
2,739
1
2,735
3
2,731
1
2,730
1
2,725
1
2,724
1
2,722
3
2,721
1
2,719
1
2,718
1
2,715
2
2,714
2
2,713
2
2,711
1
2,707
3
2,705
1
2,704
1
2,702
1
2,701
1
2,700
2
2,698
2
2,697
2
2,696
1
2,695
1
2,694
2
2,691
1
2,690
3
2,689
4
2,688
1
2,685
1
2,684
1
2,682
2
2,681
2
2,680
4
2,679
5
2,678
2
2,677
2
2,676
2
2,675
2
2,674
1
2,673
1
2,672
3
2,671
5
2,670
5
2,669
2
2,668
1
2,667
6
2,666
2
2,665
3
2,664
2
2,663
1
2,662
4
2,661
3
2,660
5
2,659
2
2,658
4
2,657
3
2,656
3
2,655
2
2,654
4
2,653
3
2,652
2
2,651
1
2,650
7
2,649
9
2,648
1
2,647
4
2,646
5
2,645
4
2,643
3
2,642
4
2,641
4
2,640
4
2,639
6
2,638
4
2,637
4
2,636
1
2,635
4
2,634
3
2,633
4
2,632
8
2,631
4
2,630
5
2,629
3
2,628
1
2,627
1
2,626
3
2,625
1
2,623
6
2,622
5
2,621
3
2,620
6
2,619
6
2,618
4
2,617
7
2,616
4
2,615
3
2,614
5
2,613
6
2,612
4
2,611
7
2,610
5
2,609
5
2,608
3
2,607
2
2,605
2
2,604
2
2,603
3
2,602
7
2,601
4
2,600
4
2,599
3
2,598
7
2,597
1
2,596
2
2,595
5
2,594
4
2,593
3
2,592
3
2,591
4
2,590
8
2,589
2
2,588
1
2,587
1
2,585
2
2,584
3
2,583
1
2,582
1
2,581
5
2,580
2
2,579
3
2,578
2
2,577
3
2,576
5
2,573
3
2,572
1
2,571
4
2,569
3
2,568
3
2,567
6
2,566
4
2,565
2
2,562
1
2,561
1
2,560
1
2,554
3
2,552
1
2,551
1
2,550
1
2,549
1
2,548
2
2,546
3
2,545
2
2,544
2
2,543
1
2,542
1
2,541
2
2,539
3
2,538
3
2,536
3
2,534
3
2,533
1
2,532
1
2,531
2
2,527
1
2,526
1
2,525
1
2,524
2
2,520
2
2,519
1
2,516
1
2,515
1
2,512
1
2,505
1
2,504
2
2,503
2
2,480
1
2,477
1

Test runs: 1,311,972Avg run : 0.000001 seconds Test time: 1.421094 seconds Data Save: 0.094768 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