mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-27 04:24:45 +01:00
26 lines
398 B
PHP
26 lines
398 B
PHP
--TEST--
|
|
Check for uv_prepare
|
|
--FILE--
|
|
<?php
|
|
$loop = uv_default_loop();
|
|
$check = uv_check_init($loop);
|
|
|
|
$idle = uv_idle_init();
|
|
|
|
$i = 0;
|
|
uv_idle_start($idle, function($stat) use (&$i, $idle, $loop){
|
|
$i++;
|
|
|
|
if ($i > 3) {
|
|
uv_idle_stop($idle);
|
|
}
|
|
});
|
|
|
|
uv_check_start($check, function($check, $status){
|
|
echo "Hello";
|
|
uv_check_stop($check);
|
|
});
|
|
|
|
uv_run();
|
|
--EXPECT--
|
|
Hello |