xref: /php-uv/examples/tty.php (revision 99312394)
1<?php
2
3uv_fs_open(uv_default_loop(), "/dev/tty", UV::O_RDONLY, 0, function($fd) {
4    $tty = uv_tty_init(uv_default_loop(), $fd, 1);
5    var_dump(uv_tty_get_winsize($tty, $width, $height));
6    var_dump($width, $height);
7});
8
9uv_run();
10