fork(2) download
  1. <?php
  2.  
  3.  
  4. $anonDice1 = mt_rand(1, 6);
  5. $anonDice2 = mt_rand(1, 6);
  6.  
  7. $computerDice1 = mt_rand(1, 6);
  8. $computerDice2 = mt_rand(1 ,6);
  9.  
  10. echo "Anon got {$anonDice1} and {$anonDice2}\n computer got {$computerDice1} and {$computerDice2}\n";
  11.  
  12. $anonSum = ($anonDice1 + $anonDice2);
  13. $computerSum = ($computerDice1 + $computerDice2);
  14.  
  15. if($anonSum == $computerSum){
  16. echo "Drow";
  17. exit();
  18. }
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
Anon got 1 and 5
 computer got 1 and 5
Drow