PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/ext_file/fread.php

http://github.com/facebook/hiphop-php
PHP | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | 343de84ff932d8824fe47d8fb0888216 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. <<__EntryPoint>>
  3. function main_fread() {
  4. $tempfile = tempnam('/tmp', 'vmextfiletest');
  5. $f = fopen($tempfile, 'w');
  6. fputs($f, "testing fread");
  7. fclose($f);
  8. $f = fopen($tempfile, "r");
  9. echo fread($f, 7);
  10. echo fread($f, 100);
  11. echo "\n";
  12. unlink($tempfile);
  13. }