fork download
  1. <?php
  2.  
  3. $roulette = mt_rand(0, 999999);
  4.  
  5. if ($roulette >= 99) {
  6. $roulette = ($roulette % 10);
  7. } elseif ($roulette >= 999) {
  8. $roulette = ($roulette % 100);
  9. } elseif ($roulette >= 9999) {
  10. $roulette = ($roulette % 1000);
  11. } elseif ($roulette >= 99999) {
  12. $roulette = ($roulette % 10000);
  13. } elseif ($roulette >= 999999) {
  14. $roulette = ($roulette % 100000);
  15. }
  16.  
  17. if ($roulette == 0) {
  18. echo "Null\n";
  19. } elseif ($roulette == 1) {
  20. echo "Ein\n";
  21. } elseif ($roulette == 2) {
  22. echo "Zwei\n";
  23. } elseif ($roulette == 3) {
  24. echo "Drei\n";
  25. } elseif ($roulette == 4) {
  26. echo "Fier\n";
  27. } elseif ($roulette == 5) {
  28. echo "Funf\n";
  29. } elseif ($roulette == 6) {
  30. echo "Sechs\n";
  31. } elseif ($roulette == 7) {
  32. echo "Sieben\n";
  33. } elseif ($roulette == 8) {
  34. echo "Acht\n";
  35. } elseif ($roulette == 9) {
  36. echo "Nein\n";
  37. }
  38.  
  39. ?>
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
Funf