<?php
ncurses_init();
// 端末が色をサポートしている場合に、初期化してアクティブな色を設定します
if (ncurses_has_colors()) {
ncurses_start_color();
ncurses_init_pair(1, NCURSES_COLOR_YELLOW, NCURSES_COLOR_BLUE);
ncurses_color_set(1);
}
// 指定した位置に文字列を書き込みます
ncurses_mvaddstr(10, 10, "Hello world! Yellow on blue text!");
// 出力をフラッシュします
ncurses_refresh();
ncurses_end();
?>