fork(3) download
  1. <?php
  2. $anon1= mt_rand(1,6);
  3. $anon2= mt_rand(1,6);
  4. $comp1= mt_rand(1,6);
  5. $comp2= mt_rand(1,6);
  6. echo "u menja vpalo {$anon1} i {$anon2}\n u kompa {$comp1} i {$comp2} \n";
  7. $anonSum = ( $anon1 + $anon2 );
  8. $compSum = ( $comp1 + $comp2 );
  9. if (($anon1 == $anon2) && ($comp1 == $comp2)) {
  10. echo "good luck jepta \n";
  11. exit();}
  12. elseif ($anonSum > $compSum) {
  13. echo "anon win jepta \n";
  14. exit();}
  15. elseif ($anonSum < $compSum) {
  16. echo "comp win jepta \n";
  17. exit();}
  18.  
  19.  
  20.  
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
u menja vpalo 6 i 4
 u kompa 6 i 1 
anon win jepta