readline_completion_function

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

readline_completion_functionRegisters a completion function

Description

readline_completion_function(callable $callback): bool

This function registers a completion function. This is the same kind of functionality you'd get if you hit your tab key while using Bash.

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 Values

Returns true on success or false on failure.