/hphp/test/slow/ext_file/fputs.php

http://github.com/facebook/hiphop-php · PHP · 16 lines · 11 code · 5 blank · 0 comment · 0 complexity · a13aad51e82030aa13f67d60633c847b MD5 · raw file

  1. <?hh
  2. <<__EntryPoint>>
  3. function main_fputs() {
  4. $tempfile = tempnam('/tmp', 'vmextfiletest');
  5. $f = fopen($tempfile, 'w');
  6. fputs($f, "testing fputs\n");
  7. fclose($f);
  8. $f = fopen($tempfile, "r");
  9. fpassthru($f);
  10. unlink($tempfile);
  11. }