daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // php://stdin
  3. $fp = fopen('php://stdin', 'r');
  4. echo fgets($fp) . PHP_EOL;
  5. fclose($fp);
  6.  
  7. //php://stdout
  8. $str = '標準出力テスト';
  9. $fp = fopen('php://stdout', 'w');
  10. fwrite($fp, $str);
  11. echo PHP_EOL;
  12. fclose($fp);
  13.  
  14. //php://stderr
  15. $str = '標準エラー出力テスト';
  16. $fp = fopen('php://stderr', 'w');
  17. fwrite($fp, $str);
  18. echo PHP_EOL;
  19. fclose($fp);
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