3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0; $attackCount = 1000000; for($i = 0; $i < $attackCount; $i++) { $a1 = [1,1]; 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);
Output for 5.6.38, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
int(0)

preferences:
77.37 ms | 402 KiB | 42 Q