/hphp/test/slow/ext_file/fwrite.php
PHP | 17 lines | 12 code | 5 blank | 0 comment | 0 complexity | c9b0b7030a52a245575b5cb124aa368d 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_fwrite() {
- $tempfile = tempnam('/tmp', 'vmextfiletest');
- $f = fopen($tempfile, 'w');
- fwrite($f, "testing fwrite", 7);
- fclose($f);
- $f = fopen($tempfile, 'r');
- fpassthru($f);
- echo "\n";
- unlink($tempfile);
- }