Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+1,300,310 data
+1 +10 +100 +1K +10K +MAX
range: 1-500, data points: 1,300,311, groups: 187
High / Low / Range / Average
Frequency: 2,728 / 2,407 / 321 / 2,600.62
Rows: 10 / 1 / 9 / 2.67
Frequency
Rows
2,728
1
2,722
1
2,720
1
2,714
1
2,713
1
2,708
1
2,706
2
2,705
1
2,704
1
2,701
1
2,699
1
2,697
1
2,696
2
2,695
2
2,694
1
2,693
3
2,692
1
2,691
1
2,690
4
2,687
3
2,686
1
2,684
3
2,682
3
2,680
1
2,679
1
2,677
1
2,676
1
2,674
1
2,673
3
2,672
4
2,671
1
2,670
3
2,668
5
2,667
2
2,666
1
2,664
3
2,663
2
2,662
4
2,661
2
2,660
1
2,659
2
2,656
2
2,655
2
2,654
2
2,652
4
2,651
3
2,650
4
2,648
3
2,647
4
2,646
6
2,645
2
2,643
5
2,642
2
2,641
4
2,640
4
2,639
1
2,638
2
2,637
5
2,636
3
2,635
2
2,634
2
2,633
4
2,632
3
2,631
6
2,630
1
2,629
1
2,628
2
2,626
3
2,625
3
2,624
4
2,623
3
2,622
2
2,621
2
2,620
1
2,619
4
2,618
3
2,617
3
2,616
6
2,615
3
2,614
2
2,613
3
2,612
3
2,611
2
2,610
2
2,609
4
2,608
2
2,607
2
2,606
2
2,605
7
2,604
4
2,603
6
2,602
6
2,601
3
2,600
2
2,599
10
2,598
4
2,597
2
2,596
4
2,595
6
2,594
2
2,593
4
2,592
2
2,591
7
2,590
5
2,589
3
2,588
4
2,587
5
2,586
6
2,585
3
2,584
4
2,583
3
2,582
5
2,581
3
2,580
4
2,579
1
2,578
2
2,577
1
2,576
4
2,575
4
2,574
2
2,573
5
2,572
4
2,571
5
2,570
3
2,569
3
2,568
4
2,567
4
2,566
3
2,565
3
2,564
1
2,563
5
2,562
6
2,561
4
2,560
3
2,559
4
2,558
1
2,557
6
2,556
5
2,555
4
2,554
2
2,552
2
2,551
2
2,550
2
2,549
2
2,548
1
2,547
2
2,546
1
2,545
2
2,544
2
2,543
1
2,542
4
2,541
1
2,539
5
2,538
3
2,537
3
2,536
4
2,535
2
2,533
2
2,532
1
2,531
2
2,529
1
2,528
1
2,527
1
2,525
3
2,523
3
2,522
3
2,521
3
2,520
1
2,519
1
2,518
3
2,517
1
2,516
3
2,514
1
2,511
1
2,509
1
2,506
1
2,504
1
2,502
1
2,501
1
2,494
1
2,491
1
2,487
2
2,482
1
2,480
1
2,469
1
2,465
1
2,407
1

Test runs: 1,300,311Avg run : 0.000001 seconds Test time: 1.421359 seconds Data Save: 0.125089 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