PHP 8.1.28 Released!

readline_info

(PHP 4, PHP 5, PHP 7, PHP 8)

readline_info获取/设置各种 readline 内部变量

说明

readline_info(?string $var_name = null, int|string|bool|null $value = null): mixed

获取/设置各种 readline 内部变量。

参数

var_name

变量名。

value

如果提供,将是设置的新值。

返回值

如果调用时没有参数,此函数将返回 readline 使用的所有设置的值组成的数组。元素将按照以下值进行索引 doneenderase_empty_linelibrary_versionline_buffermarkpending_inputpointpromptreadline_name、和 terminal_namearray 仅包含库用于编译 readline 扩展支持的元素。

如果使用一个或两个参数调用,则返回原来的值。

更新日志

版本 说明
8.0.0 var_namevalue 现在可为 null。
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top