daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top