3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(array( random_int(1, 2.0), random_int(1, 1.0), random_int(-1, "2"), random_int(-1, "3.1"), random_int(-2.0, 5), random_int(1.0, 5), random_int("-2", 5), random_int("3.1", 5), ));
Output for 7.3.1
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(-2) [5]=> int(4) [6]=> int(3) [7]=> int(3) }
Output for 7.3.0
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(5) [5]=> int(3) [6]=> int(-2) [7]=> int(5) }
Output for 7.2.13
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(3) [4]=> int(5) [5]=> int(5) [6]=> int(-1) [7]=> int(4) }
Output for 7.2.12
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(1) [4]=> int(0) [5]=> int(5) [6]=> int(4) [7]=> int(4) }
Output for 7.2.11
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(0) [5]=> int(1) [6]=> int(2) [7]=> int(3) }
Output for 7.2.10
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(0) [4]=> int(0) [5]=> int(4) [6]=> int(-1) [7]=> int(3) }
Output for 7.2.9
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(2) [4]=> int(-2) [5]=> int(5) [6]=> int(-2) [7]=> int(4) }
Output for 7.2.8
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(3) [4]=> int(3) [5]=> int(3) [6]=> int(5) [7]=> int(5) }
Output for 7.2.7
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(-2) [5]=> int(3) [6]=> int(1) [7]=> int(3) }
Output for 7.2.6
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(3) [5]=> int(3) [6]=> int(-2) [7]=> int(3) }
Output for 7.2.5
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(3) [4]=> int(2) [5]=> int(5) [6]=> int(5) [7]=> int(4) }
Output for 7.2.4
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) [4]=> int(5) [5]=> int(2) [6]=> int(3) [7]=> int(5) }
Output for 7.2.3
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(2) [4]=> int(2) [5]=> int(4) [6]=> int(1) [7]=> int(5) }
Output for 7.2.2
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(1) [4]=> int(-1) [5]=> int(4) [6]=> int(5) [7]=> int(5) }
Output for 7.2.1
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(5) [5]=> int(4) [6]=> int(1) [7]=> int(5) }
Output for 7.2.0
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(1) [3]=> int(0) [4]=> int(-2) [5]=> int(4) [6]=> int(2) [7]=> int(3) }
Output for 7.1.25
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(3) [5]=> int(1) [6]=> int(5) [7]=> int(4) }
Output for 7.1.24
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(2) [5]=> int(2) [6]=> int(3) [7]=> int(4) }
Output for 7.1.23
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(3) [5]=> int(3) [6]=> int(4) [7]=> int(4) }
Output for 7.1.22
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(-2) [5]=> int(2) [6]=> int(5) [7]=> int(4) }
Output for 7.1.21
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(-1) [5]=> int(3) [6]=> int(5) [7]=> int(3) }
Output for 7.1.20
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(-1) [5]=> int(1) [6]=> int(5) [7]=> int(5) }
Output for 7.1.19
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(1) [5]=> int(1) [6]=> int(4) [7]=> int(4) }
Output for 7.1.18
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(-1) [5]=> int(5) [6]=> int(5) [7]=> int(4) }
Output for 7.1.17
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(-1) [5]=> int(3) [6]=> int(5) [7]=> int(5) }
Output for 7.1.16
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(1) [4]=> int(1) [5]=> int(2) [6]=> int(2) [7]=> int(5) }
Output for 7.1.15
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(1) [5]=> int(5) [6]=> int(1) [7]=> int(5) }
Output for 7.1.14
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(4) [5]=> int(5) [6]=> int(4) [7]=> int(4) }
Output for 7.1.13
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(1) [4]=> int(2) [5]=> int(2) [6]=> int(-2) [7]=> int(3) }
Output for 7.1.12
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(1) [4]=> int(1) [5]=> int(1) [6]=> int(3) [7]=> int(3) }
Output for 7.1.11
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(1) [5]=> int(3) [6]=> int(-1) [7]=> int(3) }
Output for 7.1.10
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(5) [5]=> int(5) [6]=> int(1) [7]=> int(5) }
Output for 7.1.9
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(-1) [4]=> int(2) [5]=> int(4) [6]=> int(5) [7]=> int(4) }
Output for 7.1.8
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(4) [5]=> int(1) [6]=> int(0) [7]=> int(4) }
Output for 7.1.7
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(-1) [5]=> int(2) [6]=> int(-1) [7]=> int(3) }
Output for 7.1.6
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(1) [3]=> int(-1) [4]=> int(3) [5]=> int(2) [6]=> int(3) [7]=> int(3) }
Output for 7.1.5
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(-2) [5]=> int(5) [6]=> int(5) [7]=> int(5) }
Output for 7.1.4
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(0) [5]=> int(3) [6]=> int(-1) [7]=> int(5) }
Output for 7.1.3
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(2) [4]=> int(1) [5]=> int(2) [6]=> int(2) [7]=> int(4) }
Output for 7.1.2
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(2) [4]=> int(0) [5]=> int(2) [6]=> int(5) [7]=> int(3) }
Output for 7.1.1
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(2) [4]=> int(2) [5]=> int(1) [6]=> int(-2) [7]=> int(5) }
Output for 7.1.0
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(-2) [5]=> int(2) [6]=> int(-2) [7]=> int(5) }
Output for 7.0.33
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(2) [4]=> int(1) [5]=> int(4) [6]=> int(1) [7]=> int(4) }
Output for 7.0.32
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(5) [5]=> int(3) [6]=> int(2) [7]=> int(4) }
Output for 7.0.31
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(2) [4]=> int(-1) [5]=> int(2) [6]=> int(-2) [7]=> int(4) }
Output for 7.0.30
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) [4]=> int(-2) [5]=> int(1) [6]=> int(2) [7]=> int(3) }
Output for 7.0.29
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(4) [5]=> int(5) [6]=> int(5) [7]=> int(4) }
Output for 7.0.28
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(0) [5]=> int(3) [6]=> int(3) [7]=> int(4) }
Output for 7.0.27
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(1) [4]=> int(5) [5]=> int(1) [6]=> int(0) [7]=> int(3) }
Output for 7.0.26
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(2) [4]=> int(-1) [5]=> int(2) [6]=> int(2) [7]=> int(4) }
Output for 7.0.25
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(1) [4]=> int(-2) [5]=> int(1) [6]=> int(4) [7]=> int(4) }
Output for 7.0.24
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(-1) [5]=> int(3) [6]=> int(3) [7]=> int(3) }
Output for 7.0.23
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(-2) [5]=> int(4) [6]=> int(2) [7]=> int(3) }
Output for 7.0.22
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(5) [5]=> int(3) [6]=> int(5) [7]=> int(4) }
Output for 7.0.21
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(-2) [5]=> int(3) [6]=> int(0) [7]=> int(4) }
Output for 7.0.20
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(5) [5]=> int(2) [6]=> int(-1) [7]=> int(4) }
Output for 7.0.19
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(3) [4]=> int(2) [5]=> int(1) [6]=> int(4) [7]=> int(4) }
Output for 7.0.18
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(1) [5]=> int(3) [6]=> int(4) [7]=> int(3) }
Output for 7.0.17
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(5) [5]=> int(3) [6]=> int(-1) [7]=> int(3) }
Output for 7.0.16
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(1) [5]=> int(4) [6]=> int(0) [7]=> int(4) }
Output for 7.0.15
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(3) [4]=> int(5) [5]=> int(1) [6]=> int(-2) [7]=> int(5) }
Output for 7.0.14
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(3) [4]=> int(-2) [5]=> int(5) [6]=> int(1) [7]=> int(4) }
Output for 7.0.13
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(4) [5]=> int(3) [6]=> int(-2) [7]=> int(5) }
Output for 7.0.12
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(-1) [4]=> int(-2) [5]=> int(5) [6]=> int(-1) [7]=> int(5) }
Output for 7.0.11
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(-2) [5]=> int(2) [6]=> int(2) [7]=> int(4) }
Output for 7.0.10
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(1) [3]=> int(1) [4]=> int(5) [5]=> int(2) [6]=> int(3) [7]=> int(5) }
Output for 7.0.9
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(-2) [5]=> int(3) [6]=> int(3) [7]=> int(3) }
Output for 7.0.8
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(-1) [4]=> int(0) [5]=> int(1) [6]=> int(-2) [7]=> int(4) }
Output for 7.0.7
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(4) [5]=> int(4) [6]=> int(-1) [7]=> int(4) }
Output for 7.0.6
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(2) [5]=> int(3) [6]=> int(5) [7]=> int(4) }
Output for 7.0.5
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(-1) [5]=> int(4) [6]=> int(-2) [7]=> int(5) }
Output for 7.0.4
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(3) [5]=> int(3) [6]=> int(5) [7]=> int(4) }
Output for 7.0.3
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(2) [4]=> int(5) [5]=> int(1) [6]=> int(4) [7]=> int(5) }
Output for 7.0.2
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(2) [3]=> int(2) [4]=> int(3) [5]=> int(1) [6]=> int(3) [7]=> int(5) }
Output for 7.0.1
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(3) [4]=> int(-1) [5]=> int(5) [6]=> int(2) [7]=> int(3) }
Output for 7.0.0
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(1) [3]=> int(2) [4]=> int(-2) [5]=> int(3) [6]=> int(-2) [7]=> int(4) }
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Fatal error: Call to undefined function random_int() in /in/svgdh on line 3
Process exited with code 255.

preferences:
58.62 ms | 530 KiB | 5 Q