Gets/sets various internal readline variables
readline_info(?string $var_name = null, int|string|bool|null $value = null): mixed
A variable name.
If provided, this will be the new value of the setting.
If called with no parameters, this function returns an array of values for all the settings readline uses. The elements will be indexed by the following values: done, end, erase_empty_line, library_version, line_buffer, mark, pending_input, point, prompt, readline_name, and terminal_name. The array will only contain those elements which are supported by the library used to built the readline extension.
If called with one or two parameters, the old value is returned.
<? $return = readline_info(); print_r($return); ?>
Array ( [line_buffer] => [point] => 0 [end] => 0 [mark] => 0 [done] => 0 [pending_input] => 0 [prompt] => [terminal_name] => [completion_append_character] => [completion_suppress_append] => [library_version] => 6.2 [readline_name] => other [attempted_completion_over] => 0 )
<? $var_name = "library_version"; $return = readline_info($var_name); echo $return; ?>
<? $var_name = "readline_name"; $value = "myvalue"; $return = readline_info($var_name, $value); echo $return; ?>