3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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.2.0
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(-2) [5]=> int(5) [6]=> int(3) [7]=> int(3) }
Output for 7.1.7
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(2) [3]=> int(1) [4]=> int(1) [5]=> int(1) [6]=> int(1) [7]=> int(4) }
Output for 7.1.6
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(1) [4]=> int(5) [5]=> int(1) [6]=> int(1) [7]=> int(5) }
Output for 7.1.5
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(0) [3]=> int(0) [4]=> int(5) [5]=> int(1) [6]=> int(-2) [7]=> int(5) }
Output for 7.1.0
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(1) [3]=> int(-1) [4]=> int(3) [5]=> int(3) [6]=> int(5) [7]=> int(3) }
Output for 7.0.20
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(-1) [4]=> int(-1) [5]=> int(3) [6]=> int(5) [7]=> int(3) }
Output for 7.0.6
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(2) [5]=> int(5) [6]=> int(2) [7]=> int(4) }
Output for 7.0.5
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(-1) [5]=> int(5) [6]=> int(-2) [7]=> int(4) }
Output for 7.0.4
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(0) [4]=> int(3) [5]=> int(2) [6]=> int(1) [7]=> int(5) }
Output for 7.0.3
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(-2) [5]=> int(4) [6]=> int(0) [7]=> int(5) }
Output for 7.0.2
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) [4]=> int(0) [5]=> int(3) [6]=> int(-1) [7]=> int(4) }
Output for 7.0.1
array(8) { [0]=> int(2) [1]=> int(1) [2]=> int(-1) [3]=> int(-1) [4]=> int(2) [5]=> int(1) [6]=> int(3) [7]=> int(5) }
Output for 7.0.0
array(8) { [0]=> int(1) [1]=> int(1) [2]=> int(-1) [3]=> int(1) [4]=> int(4) [5]=> int(3) [6]=> int(1) [7]=> int(3) }
Output for 5.3.18 - 5.6.28
Fatal error: Call to undefined function random_int() in /in/svgdh on line 3
Process exited with code 255.