3v4l.org

run code in 300+ PHP versions simultaneously
<?php mt_srand (microtime(true)); $six_digit_random_number = mt_rand(1000, 9999); echo $six_digit_random_number;
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.12
1413
Output for 5.2.1 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.22, 5.6.24 - 5.6.38, 7.0.1 - 7.0.33
1329
Output for 5.6.23, 7.0.0
8141
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
8250
Output for 4.4.9
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 9556
Output for 4.4.8
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 6209
Output for 4.4.7
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 3693
Output for 4.4.6
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 4668
Output for 4.4.5
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7013
Output for 4.4.4
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 5695
Output for 4.4.3
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 6473
Output for 4.4.2
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 8270
Output for 4.4.1
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 2700
Output for 4.4.0
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 8317
Output for 4.3.11
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 9014
Output for 4.3.10
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 1718
Output for 4.3.9
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 8363
Output for 4.3.8
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7629
Output for 4.3.7
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 1305
Output for 4.3.6
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 9345
Output for 4.3.5
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 2212
Output for 4.3.4
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 5638
Output for 4.3.3
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 6231
Output for 4.3.2
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7089
Output for 4.3.1
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 2175
Output for 4.3.0
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 3605

preferences:
177.07 ms | 401 KiB | 318 Q