PHP readline_info Function – Get and Set Readline Variables
The PHP readline_info function retrieves or sets internal readline variables, returning all settings as an array when called without arguments or the previous value when a variable name (and optional new value) is provided, with usage illustrated by a complete code example.
The readline_info function in PHP allows you to retrieve or set internal readline variables.
When called without arguments, it returns an associative array containing all current readline settings such as done , end , prompt , and others. If one or two arguments are provided, the function sets the specified variable and returns its previous value.
Parameters:
varname (string) – the name of the variable to get or set.
newvalue (string, optional) – the value to assign to the variable.
Return value:
Without parameters: an array of all readline settings.
With parameters: the original value of the specified variable.
Example usage:
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.