mirror of
https://github.com/danog/ext-uv.git
synced 2024-12-02 09:27:58 +01:00
21 lines
391 B
Plaintext
21 lines
391 B
Plaintext
|
--TEST--
|
||
|
Check poll functions with with non socket file descriptors
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$fd = fopen('php://temp', 'r+');
|
||
|
stream_set_blocking($fd, 0);
|
||
|
$loop = uv_loop_new();
|
||
|
$poll = uv_poll_init($loop, $fd);
|
||
|
uv_poll_start($poll, UV::READABLE, function($poll, $stat, $ev, $fd) {
|
||
|
echo "OK";
|
||
|
uv_poll_stop($poll);
|
||
|
|
||
|
fclose($fd);
|
||
|
});
|
||
|
uv_run($loop);
|
||
|
|
||
|
fwrite($fd, 'hello');
|
||
|
|
||
|
--EXPECT--
|
||
|
OK
|