3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mt_srand (microtime(true)); $six_digit_random_number = mt_rand(1000, 9999); echo $six_digit_random_number;
Output for 7.1.0
1413
Output for 5.2.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
1329
Output for 5.0.0 - 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 9429
Output for 4.4.8
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 2942
Output for 4.4.7
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7024
Output for 4.4.6
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 4630
Output for 4.4.5
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 6095
Output for 4.4.4
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 3937
Output for 4.4.3
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7128
Output for 4.4.2
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7896
Output for 4.4.1
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 5986
Output for 4.4.0
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 4900
Output for 4.3.11
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 3892
Output for 4.3.10
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 6303
Output for 4.3.9
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 8294
Output for 4.3.8
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 5654
Output for 4.3.7
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7962
Output for 4.3.6
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7075
Output for 4.3.5
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7757
Output for 4.3.4
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 9058
Output for 4.3.3
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7563
Output for 4.3.2
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 9106
Output for 4.3.1
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 7103
Output for 4.3.0
Warning: mt_srand() expects parameter 1 to be long, string given in /in/1ZNoq on line 2 5890