Show Ads
 Refresh   About   Tools 

PHP rand() Randomosity Tester

TIMEOUT
+625,948 data
+1 +10 +100 +1K +10K +MAX
range: 1-1,000, data points: 625,949, groups: 126
High / Low / Range / Average
Frequency: 708 / 549 / 159 / 625.95
Rows: 25 / 1 / 24 / 7.94
Frequency
Rows
708
1
707
1
705
1
690
1
688
1
687
1
686
2
685
1
684
1
683
1
681
1
680
4
679
1
678
1
676
5
675
2
674
3
673
2
672
1
671
5
670
1
669
4
668
1
667
7
666
2
665
3
664
3
663
8
662
7
661
6
659
6
658
9
657
12
656
8
655
5
654
8
653
12
652
8
651
13
650
13
649
6
648
11
647
10
646
5
645
4
644
13
643
8
642
15
641
15
640
19
639
13
638
20
637
21
636
25
635
20
634
20
633
17
632
12
631
14
630
8
629
17
628
15
627
15
626
17
625
14
624
15
623
13
622
15
621
23
620
17
619
17
618
18
617
16
616
11
615
12
614
14
613
13
612
9
611
13
610
14
609
8
608
12
607
13
606
10
605
10
604
11
603
15
602
9
601
14
600
10
599
10
598
10
597
9
596
6
595
7
594
7
593
8
592
5
591
6
590
5
589
6
588
5
587
7
586
5
585
3
584
6
583
3
582
3
581
2
580
2
579
3
578
5
576
4
575
1
573
2
572
1
571
1
570
1
569
1
568
1
567
2
565
1
564
1
560
1
557
1
549
1

Test runs: 625,949Avg run : 0.000002 seconds Test time: 1.427298 seconds Data Save: 0.236021 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