TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
410 B

<?php
function safe_write($fd, $data)
{
$len = strlen($data);
do {
$w = fwrite($fd, $data);
$len -= $w;
} while ($len && ($data = substr($data, $w)) !== FALSE);
}
function sync($tmp)
{
global $pipe;
$data = "hello world";
safe_write($pipe, $data);
}
function main()
{
global $pipe;
$pipes = stream_socket_pair(AF_UNIX, SOCK_STREAM, 0);
$pipe = $pipes[0];
}