3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 0; $attackCount = 1000000; for($i = 0; $i < $attackCount; $i++) { $a1 = [rand(1,6), rand(1,6), rand(1,6)]; arsort($a1); $b1 = [rand(1,6), rand(1,6)]; arsort($b1); $a += $a1[0] > $b1[0]; $a += $a1[1] > $b1[1]; } var_dump($a / $attackCount);
based on 02Vra
Output for 7.3.0rc3
float(0.833445)
Output for 7.3.0rc2
float(0.833124)
Output for 7.3.0rc1
float(0.833032)
Output for 7.3.0beta3
float(0.834395)
Output for 7.3.0beta2
float(0.832751)
Output for 7.3.0beta1
float(0.833357)
Output for 7.3.0alpha4
float(0.833169)
Output for 7.3.0alpha3
float(0.832386)
Output for 7.3.0alpha2
float(0.831817)
Output for 7.3.0alpha1
float(0.833382)
Output for 7.2.11
float(0.833388)
Output for 7.2.10
float(0.833161)
Output for 7.2.9
float(0.833072)
Output for 7.2.8
float(0.833008)
Output for 7.2.7
float(0.832226)
Output for 7.2.6
float(0.834423)
Output for 7.2.5
float(0.833001)
Output for 7.2.4
float(0.833353)
Output for 7.2.3
float(0.831333)
Output for 7.2.2
float(0.832926)
Output for 7.2.1
float(0.832448)
Output for 7.2.0
float(0.833183)
Output for 7.1.23
float(0.832527)
Output for 7.1.22
float(0.832261)
Output for 7.1.21
float(0.833285)
Output for 7.1.20
float(0.833866)
Output for 7.1.19
float(0.832072)
Output for 7.1.18
float(0.833879)
Output for 7.1.17
float(0.834399)
Output for 7.1.16
float(0.834005)
Output for 7.1.15
float(0.832716)
Output for 7.1.14
float(0.833911)
Output for 7.1.13
float(0.831385)
Output for 7.1.12
float(0.832632)
Output for 7.1.11
float(0.833131)
Output for 7.1.10
float(0.833335)
Output for 7.1.9
float(0.834026)
Output for 7.1.8
float(0.834557)
Output for 7.1.7
float(0.832743)
Output for 7.1.6
float(0.83405)
Output for 7.1.5
float(0.834252)
Output for 7.1.4
float(0.832614)
Output for 7.1.3
float(0.834197)
Output for 7.1.2
float(0.833449)
Output for 7.1.1
float(0.833451)
Output for 7.1.0
float(0.833891)
Output for 7.0.28
float(0.833957)
Output for 5.6.38
float(0.832691)