Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. init_conversation();
  3.  
  4. function init_conversation(){
  5. diga("- Quanto custou pra fazer essa carteira?\r\n");
  6. diga("- TREIX REAIX.\r\n");
  7. conversa_perplexa();
  8. }
  9.  
  10.  
  11. function diga($frase){
  12. echo $frase;
  13. sleep('1');
  14. }
  15.  
  16. function conversa_perplexa() {
  17. diga("- TREIX REAIX?!\r\n");
  18. diga("- TREIX REAIX...\r\n\r\n");
  19. diga("Ainda esta muito impressionada? (Y|n)\r\n");
  20. loop_conversation(trim(fgets(STDIN)));
  21. }
  22.  
  23. function loop_conversation($ainda_esta_muito_impressionada = 'Y'){
  24. if($ainda_esta_muito_impressionada === 'Y'){
  25. conversa_perplexa();
  26. } else if($ainda_esta_muito_impressionada === 'n') {
  27. end_conversation();
  28. } else {
  29. conversa_perplexa();
  30. }
  31. }
  32.  
  33. function end_conversation(){
  34. return;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement