daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for(;;){
  2.  
  3. fwrite(STDOUT, "n");
  4. $name = fgets(STDIN);
  5. fwrite(STDOUT, "Hello $name");
  6.  
  7. sleep(1);
  8. }
  9.    
  10. for(;;){
  11.     $read = array(STDIN);
  12.     $write = NULL;
  13.     $except = NULL;
  14.     if(stream_select($read, $write, $except, 0, 200000) > 0) {
  15.         if($read) {
  16.             $name = fgets(STDIN);
  17.             fwrite(STDOUT, "Hello $name");
  18.         }
  19.     } else {
  20.         fwrite(STDOUT, "Waiting...n");
  21.     }
  22. }
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