fork(1) download
  1. <?php
  2.  
  3. $anonDice1 = mt_rand(1,6);
  4. $anonDice2 = mt_rand(1,6);
  5.  
  6. $compDice1 = mt_rand(1,6);
  7. $compDice2 = mt_rand(1,6);
  8.  
  9. $anonSum = $anonDice1 + $anonDice2;
  10. $compSum = $compDice1 + $compDice2;
  11.  
  12. if (($anonDice1 == $anonDice2) && ($compDice1 == $compDice2)){
  13. echo "You got double-double. Make a screenshot.";
  14. } elseif ($anonSum == $compSum){
  15. echo "DRAW. {$anonSum} {$anonSum}";
  16. } elseif ($anonSum > $compSum){
  17. echo "Anon win! He has {$anonSum} and comp has {$compSum}";
  18. } else ($anonSum < $compSum)
  19. echo "Comp win!";
  20. exit();
  21.  
  22.  
  23. ?>
  24.  
Runtime error #stdin #stdout #stderr 0.02s 52432KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected 'echo' (T_ECHO) in /home/tsvnJ6/prog.php on line 20