/hphp/test/slow/ext_file/feof.php
PHP | 19 lines | 14 code | 5 blank | 0 comment | 0 complexity | 184c26aa5ff8d810d8ee8bc3348c27af 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_feof() {
- $tempfile = tempnam('/tmp', 'vmextfiletest');
- $f = fopen($tempfile, 'w');
- fputs($f, "testing feof");
- fclose($f);
- $f = fopen($tempfile, "r");
- var_dump(feof($f));
- echo fread($f, 20);
- echo "\n";
- var_dump(feof($f));
- unlink($tempfile);
- }