readline_completion_function

Registers a completion function

Syntax

readline_completion_function(callable $callback): bool

Parameters

callback

You must supply the name of an existing function which accepts a partial command line and returns an array of possible matches.

Return

Returns true on success or false on failure.

Examples

<?

function myfunction($input)
{
    $array = array();

    return $array;
}

$function = "myfunction";

$return = readline_completion_function($function);

var_export($return);

?>
true

readline

readline_add_history

readline_callback_handler_install

readline_callback_handler_remove

readline_callback_read_char

readline_clear_history

readline_info

readline_list_history

readline_on_new_line

readline_read_history

readline_redisplay

readline_write_history

PHP

Home Menu