ext-uv/examples/tty.php
2020-02-15 22:36:03 +01:00

10 lines
236 B
PHP

<?php
uv_fs_open(uv_default_loop(), "/dev/tty", UV::O_RDONLY, 0, function($fd) {
$tty = uv_tty_init(uv_default_loop(), $fd, 1);
var_dump(uv_tty_get_winsize($tty, $width, $height));
var_dump($width, $height);
});
uv_run();