3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 0; for($i=1; $i<=10000;$i++) { $rand = random_int(1, 200); if ($rand <= 2) $a++; } echo $a;
based on aicDa
Output for 7.3.1
106
Output for hhvm-3.15.4, 7.0.7, 7.0.16, 7.0.19, 7.2.9, 7.3.0
100
Output for 7.0.20, 7.2.13
93
Output for 7.2.12
81
Output for 7.2.11
105
Output for 7.2.10
91
Output for 7.0.11, 7.2.8
96
Output for 7.1.5, 7.2.7
108
Output for 7.0.12, 7.2.0, 7.2.6
102
Output for 7.1.0, 7.2.5
109
Output for 7.0.14, 7.2.4
101
Output for 7.2.1, 7.2.3
103
Output for 7.1.7, 7.2.2
94
Output for 7.1.25
114
Output for 7.1.10
111
Output for 7.1.6
82
Output for 7.0.0, 7.0.18, 7.1.4
95
Output for 7.1.3
107
Output for 7.1.2
117
Output for 7.0.1, 7.0.5, 7.1.1
104
Output for 7.0.17
87
Output for 7.0.15
89
Output for 7.0.13
84
Output for 7.0.10
120
Output for 7.0.9
74
Output for 7.0.8
116
Output for 7.0.6
99
Output for 7.0.3 - 7.0.4
113
Output for 7.0.2
86
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function random_int() in /in/GVVUR on line 5
Process exited with code 255.