/hphp/test/slow/ext_file/fread.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
- <?hh
- <<__EntryPoint>>
- function main_fread() {
- $tempfile = tempnam('/tmp', 'vmextfiletest');
- $f = fopen($tempfile, 'w');
- fputs($f, "testing fread");
- fclose($f);
- $f = fopen($tempfile, "r");
- echo fread($f, 7);
- echo fread($f, 100);
- echo "\n";
- unlink($tempfile);
- }