Init Repo

This commit is contained in:
root
2019-09-06 23:53:10 +08:00
commit f0ef89dfbb
7905 changed files with 914138 additions and 0 deletions

15
vendor/swoole/examples/mmap/mmap.php vendored Executable file
View File

@ -0,0 +1,15 @@
<?php
$file = '/tmp/data';
$size = 8192;
if (!is_file($file)) {
file_put_contents($file, str_repeat("\0", $size));
}
$fp = swoole\mmap::open($file, 8192);
fwrite($fp, "hello world\n");
fwrite($fp, "hello swoole\n");
fflush($fp);
fclose($fp);