HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

readline_completion_function

Description

The readline_completion_function of Readline for PHP 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

1

<?

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

    return $array;
}

$function = "myfunction";

$return = readline_completion_function($function);

var_export($return);
true