xref: /php-uv/tests/100-uv_check.phpt (revision b05e1489)
1--TEST--
2Check for uv_check
3--FILE--
4<?php
5$loop = uv_default_loop();
6$check = uv_check_init($loop);
7
8$idle = uv_idle_init();
9
10$i = 0;
11uv_idle_start($idle, function($stat) use (&$i, $idle, $loop){
12    $i++;
13
14    if ($i > 3) {
15        uv_idle_stop($idle);
16    }
17});
18
19uv_check_start($check, function($check) {
20    echo "Hello";
21    uv_check_stop($check);
22});
23
24uv_run();
25--EXPECT--
26Hello
27